Merge pull request #1011 from pi-hole/fix/sudoers

Fix: Dynamic instead of static sudoers file
pull/1017/head
Dan Schaper 8 years ago committed by GitHub
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…
Cancel
Save