mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 23:08:07 +00:00
Merge pull request #1011 from pi-hole/fix/sudoers
Fix: Dynamic instead of static sudoers file
This commit is contained in:
commit
9355a8ad0e
@ -9,4 +9,3 @@
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
www-data ALL=NOPASSWD: /usr/local/bin/pihole
|
||||
|
@ -801,6 +801,8 @@ installPiholeWeb() {
|
||||
echo -n "::: Installing sudoer file..."
|
||||
mkdir -p /etc/sudoers.d/
|
||||
cp /etc/.pihole/advanced/pihole.sudo /etc/sudoers.d/pihole
|
||||
# Add lighttpd user (OS dependent) to sudoers file
|
||||
echo "${LIGHTTPD_USER} ALL=NOPASSWD: /usr/local/bin/pihole" >> /etc/sudoers.d/pihole
|
||||
chmod 0440 /etc/sudoers.d/pihole
|
||||
echo " done!"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user