mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-27 17:50:15 +00:00
sudo
no longer required. Script will always run as root.
This commit is contained in:
parent
962d162d75
commit
067fbd0a3b
1 changed files with 4 additions and 1 deletions
|
@ -54,6 +54,9 @@ else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "::: sudo utility found and will be used for the install."
|
echo "::: sudo utility found and will be used for the install."
|
||||||
|
echo "::: Restarting script with sudo"
|
||||||
|
exec sudo bash "$0" "$@"
|
||||||
|
exit $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Compatibility
|
# Compatibility
|
||||||
|
@ -62,7 +65,7 @@ if [ -x "$(command -v apt-get)" ];then
|
||||||
#Debian Family
|
#Debian Family
|
||||||
#Decide if php should be `php5` or just `php` (Fixes issues with Ubuntu 16.04 LTS)
|
#Decide if php should be `php5` or just `php` (Fixes issues with Ubuntu 16.04 LTS)
|
||||||
phpVer="php"
|
phpVer="php"
|
||||||
${SUDO} apt-get install --dry-run php5 > /dev/null 2>&1
|
apt-get install --dry-run php5 > /dev/null 2>&1
|
||||||
if [ $? == 0 ]; then
|
if [ $? == 0 ]; then
|
||||||
phpVer="php5"
|
phpVer="php5"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue