From a2bb5bc8940f91d410e3d42bbb025c3e37754945 Mon Sep 17 00:00:00 2001 From: Sophia Atkinson Date: Sun, 23 Oct 2022 13:29:22 -0700 Subject: [PATCH] Update 'scripts/pmauninstall.sh' --- scripts/pmauninstall.sh | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/scripts/pmauninstall.sh b/scripts/pmauninstall.sh index 9834c10..e34722a 100644 --- a/scripts/pmauninstall.sh +++ b/scripts/pmauninstall.sh @@ -18,16 +18,25 @@ do done sudo apt remove phpmyadmin -y sudo apt-get autoremove -y +rm -rf /usr/share/phpmyadmin/ sudo systemctl restart apache2 - -while [ "$go" != 'yes' ] && [ "$go" != 'no' ]; do - read -p "Would you like to also uninstall apache2? This is not reversible. (yes/no) " go +while true +do + read -r -p "Would you like to also uninstall apache2? This is not reversible. [Y/n] " input + + case $input in + [yY][eE][sS]|[yY]) + break + ;; + [nN][oO]|[nN]) + break + ;; + *) + echo "That wasn't an option..." + ;; + esac done - -if [ "$go" == 'no' ]; then - exit -fi sudo systemctl stop apache2 sudo apt remove apache2 -y sudo apt-get autoremove -y