mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-28 00:53:19 +00:00
attempt to self-elevate to root user to execute script
This commit is contained in:
parent
362fe627c6
commit
a6edbf091d
2 changed files with 7 additions and 6 deletions
|
@ -18,8 +18,8 @@
|
|||
|
||||
# Must be root to install
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "ERROR: You must run this script as a root user"
|
||||
exit 1
|
||||
sudo bash "$0" "$@"
|
||||
exit $?
|
||||
fi
|
||||
|
||||
######## VARIABLES #########
|
||||
|
|
|
@ -10,10 +10,11 @@
|
|||
|
||||
# Must be root to uninstall
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "ERROR: You must run this script as a root user"
|
||||
exit 1
|
||||
sudo bash "$0" "$@"
|
||||
exit $?
|
||||
fi
|
||||
|
||||
|
||||
######### SCRIPT ###########
|
||||
apt-get -y remove --purge dnsutils bc toilet
|
||||
apt-get -y remove --purge dnsmasq
|
||||
|
|
Loading…
Reference in a new issue