updated PMA scripts

This commit is contained in:
2023-08-31 20:10:37 -07:00
parent 9961c8679a
commit bf3e3609fa
4 changed files with 25 additions and 41 deletions

View File

@ -15,34 +15,20 @@ do
echo "That wasn't an option..."
;;
esac
done
done
if [ -n "$(dpkg --get-selections | grep apache)" ]; then
sudo apt remove phpmyadmin -y
sudo apt-get autoremove -y
sudo rm -rf /usr/share/phpmyadmin/
sudo rm -rf /etc/apache2/sites-enabled/phpmyadmin.conf
sudo systemctl restart apache2
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
sudo systemctl stop apache2
sudo apt remove apache2 -y
fi
if [ -n "$(dpkg --get-selections | grep nginx install)" ]; then
sudo apt remove phpmyadmin -y
sudo apt-get autoremove -y
sudo rm -rf /usr/share/phpmyadmin/
sudo rm -rf /etc/nginx/conf.d/phpmyadmin.conf
sudo systemctl restart nginx
fi