attempt to self-elevate to root user to execute script

This commit is contained in:
Josh Kastang 2016-01-10 16:48:48 +00:00
parent 362fe627c6
commit a6edbf091d
2 changed files with 7 additions and 6 deletions

View file

@ -18,8 +18,8 @@
# Must be root to install # Must be root to install
if [[ $EUID -ne 0 ]]; then if [[ $EUID -ne 0 ]]; then
echo "ERROR: You must run this script as a root user" sudo bash "$0" "$@"
exit 1 exit $?
fi fi
######## VARIABLES ######### ######## VARIABLES #########

View file

@ -10,10 +10,11 @@
# Must be root to uninstall # Must be root to uninstall
if [[ $EUID -ne 0 ]]; then if [[ $EUID -ne 0 ]]; then
echo "ERROR: You must run this script as a root user" sudo bash "$0" "$@"
exit 1 exit $?
fi fi
######### SCRIPT ########### ######### SCRIPT ###########
apt-get -y remove --purge dnsutils bc toilet apt-get -y remove --purge dnsutils bc toilet
apt-get -y remove --purge dnsmasq apt-get -y remove --purge dnsmasq