In general:
- Each script reruns itself as either root or pihole. Any $SUDO variables are removed.
- Two new scripts are created that need to be run as root.
- The installer creates a file in sudoers.d that allows the pihole user to run the above two scripts as root.
piholeReloadServices.sh: Script to reload dnsmasq (or start it if required).
piholeSetPermissions.sh: Script to set the permissions on /etc/pihole
basic-install.sh:
- Copy two new scripts.
- Set owner and permissions on /etc/pihole
- Install the sudoers file to allow the pihole user to run certain scripts as root without a password.
uninstall.sh:
- Remote two new scripts.
- Remove sudoers file
gravity.sh:
- Rerun as pihole user.
- Use sudo for setting permissions and reloading services.
- Replaced chmod 777 with piholeSetPermissions.sh.
blacklist.sh, whitelist.sh: Rerun as pihole user. Use sudo for reloading services.
chronometer.sh, piholeLogFlush.sh: Rerun as pihole user.
setupLCD.sh: Rerun as root.