From cac9c633259ec92d9c1c022f7c5330faa8a87028 Mon Sep 17 00:00:00 2001 From: zbholman Date: Wed, 16 Nov 2016 17:06:30 -0500 Subject: [PATCH] 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. --- automated install/uninstall.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/automated install/uninstall.sh b/automated install/uninstall.sh index abba88a5..b3ce5c7e 100755 --- a/automated install/uninstall.sh +++ b/automated install/uninstall.sh @@ -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"