Set executable permissions of pihole and changed installer to invoke sudo for gravity.sh.

Note: We invoke gravity.sh with sudo in other places, so ignore the removed comment.
This commit is contained in:
nate 2016-04-02 18:39:09 -05:00
parent d47fbbbe96
commit 75f1969bd2

View file

@ -484,6 +484,7 @@ installScripts() {
$SUDO cp /etc/.pihole/advanced/Scripts/setupLCD.sh /opt/pihole/setupLCD.sh $SUDO cp /etc/.pihole/advanced/Scripts/setupLCD.sh /opt/pihole/setupLCD.sh
$SUDO chmod 755 /opt/pihole/{gravity,chronometer,whitelist,blacklist,piholeLogFlush,updateDashboard,uninstall,setupLCD}.sh $SUDO chmod 755 /opt/pihole/{gravity,chronometer,whitelist,blacklist,piholeLogFlush,updateDashboard,uninstall,setupLCD}.sh
$SUDO cp /etc/.pihole/pihole /usr/local/bin/pihole $SUDO cp /etc/.pihole/pihole /usr/local/bin/pihole
$SUDO chmod 755 /usr/local/bin/pihole
$SUDO cp /etc/.pihole/advanced/bash-completion/pihole /etc/bash-completion.d/pihole $SUDO cp /etc/.pihole/advanced/bash-completion/pihole /etc/bash-completion.d/pihole
$SUDO echo " done." $SUDO echo " done."
} }
@ -655,9 +656,8 @@ runGravity() {
echo "::: Cleaning up previous install (preserving whitelist/blacklist)" echo "::: Cleaning up previous install (preserving whitelist/blacklist)"
$SUDO rm /etc/pihole/list.* $SUDO rm /etc/pihole/list.*
fi fi
#Don't run as SUDO, this was causing issues
echo "::: Running gravity.sh" echo "::: Running gravity.sh"
/opt/pihole/gravity.sh $SUDO /opt/pihole/gravity.sh
} }
setUser(){ setUser(){