Added removal of pihole user to the uninstall.sh

Not sure if I should have created a variable for the username or if the echo is necessary. And this is my first time doing a pull request, hopefully it works out lol.
This commit is contained in:
zbholman 2016-11-16 17:06:30 -05:00 committed by GitHub
parent 69e3a45083
commit cac9c63325
1 changed files with 6 additions and 0 deletions

View File

@ -154,6 +154,12 @@ removeNoPurge() {
${SUDO} rm /usr/local/bin/pihole &> /dev/null
${SUDO} rm /etc/bash_completion.d/pihole &> /dev/null
${SUDO} rm /etc/sudoers.d/pihole &> /dev/null
# If the pihole user exists, then remove
if id "pihole" >/dev/null 2>&1; then
echo "::: Removing pihole user..."
${SUDO} userdel -r pihole
fi
echo ":::"
printf "::: Finished removing PiHole from your system. Sorry to see you go!\n"