diff --git a/scripts/pmainstall.sh b/scripts/pmainstall.sh index 6c1f667..21649d6 100644 --- a/scripts/pmainstall.sh +++ b/scripts/pmainstall.sh @@ -1,13 +1,22 @@ #!/bin/bash -while [ "$go" != 'y' ] && [ "$go" != 'n' ]; do - read -p "Would you like to install phpMyAdmin? (y/n) " go +while true +do + read -r -p "Would you like to install phpMyAdmin? [Y/n] " input + + case $input in + [yY][eE][sS]|[yY]) + break + ;; + [nN][oO]|[nN]) + break + ;; + *) + echo "That wasnt an option..." + ;; + esac done -if [ "$go" == 'n' ]; then - exit -fi - sudo apt update && apt upgrade -y sudo add-apt-repository ppa:ondrej/php && apt install libapache2-mod-php8.1 -y sudo systemtl stop apache2