mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 10:43:55 +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
2 changed files with 2 additions and 1 deletions
|
@ -9,4 +9,3 @@
|
||||||
# the Free Software Foundation, either version 2 of the License, or
|
# the Free Software Foundation, either version 2 of the License, or
|
||||||
# (at your option) any later version.
|
# (at your option) any later version.
|
||||||
|
|
||||||
www-data ALL=NOPASSWD: /usr/local/bin/pihole
|
|
||||||
|
|
|
@ -801,6 +801,8 @@ installPiholeWeb() {
|
||||||
echo -n "::: Installing sudoer file..."
|
echo -n "::: Installing sudoer file..."
|
||||||
mkdir -p /etc/sudoers.d/
|
mkdir -p /etc/sudoers.d/
|
||||||
cp /etc/.pihole/advanced/pihole.sudo /etc/sudoers.d/pihole
|
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
|
chmod 0440 /etc/sudoers.d/pihole
|
||||||
echo " done!"
|
echo " done!"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue