mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
parent
bee109c784
commit
0a0f00da3b
2 changed files with 17 additions and 2 deletions
|
@ -17,11 +17,19 @@
|
|||
# curl -L install.pi-hole.net | bash
|
||||
|
||||
######## VARIABLES #########
|
||||
# Must be root to install
|
||||
if [[ $EUID -eq 0 ]];then
|
||||
echo "You are root."
|
||||
else
|
||||
echo "sudo will be used for the install."
|
||||
export SUDO="sudo"
|
||||
# Check if it is actually installed
|
||||
# If it isn't, exit because the install cannot complete
|
||||
if [[ $(dpkg-query -s sudo) ]];then
|
||||
export SUDO="sudo"
|
||||
else
|
||||
echo "Please install sudo or run this as root."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
|
|
@ -13,7 +13,14 @@ if [[ $EUID -eq 0 ]];then
|
|||
echo "You are root."
|
||||
else
|
||||
echo "sudo will be used for the install."
|
||||
export SUDO="sudo"
|
||||
# Check if it is actually installed
|
||||
# If it isn't, exit because the unnstall cannot complete
|
||||
if [[ $(dpkg-query -s sudo) ]];then
|
||||
export SUDO="sudo"
|
||||
else
|
||||
echo "Please install sudo or run this as root."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue