Commit graph

7 commits

Author SHA1 Message Date
ryt51V
eac950453c Removed redundant sudo. 2016-03-05 11:18:10 +00:00
ryt51V
f02666ef6e Rerunning with sudo is now part of piholeInclude functions.
Changed piholeLogFlush.sh to run as root, not pihole.
2016-03-04 10:00:17 +00:00
ryt51V
8d1c1e2b06 Fixed missing "$0" in sudos 2016-03-02 21:17:08 +00:00
ryt51V
9a68adf36f Big sudo refactor.
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.
2016-03-02 20:49:23 +00:00
jacobsalmela
0116b6341c updated script
Added links to where code was borrowed from
added reboot at the end
also added a few things commented out that might be useful for some
people to learn.
2016-02-20 01:14:48 -06:00
jacobsalmela
3142992c57 update 2016-02-14 10:53:13 -06:00
jacobsalmela
71fd32b1f4 script to set everything up 2016-01-23 12:56:27 -06:00