thelinuxlist/scripts/pmauninstall.sh

48 lines
975 B
Bash
Raw Permalink Normal View History

2022-10-19 09:45:09 -07:00
#!/bin/bash
2022-10-20 11:00:18 -07:00
while true
do
read -r -p "Would you like to uninstall phpMyAdmin? [Y/n] " input
case $input in
[yY][eE][sS]|[yY])
break
;;
[nN][oO]|[nN])
break
;;
*)
2022-10-20 11:03:28 -07:00
echo "That wasn't an option..."
2022-10-20 11:00:18 -07:00
;;
esac
2022-10-19 09:45:09 -07:00
done
sudo apt remove phpmyadmin -y
sudo apt-get autoremove -y
2022-10-23 13:29:22 -07:00
rm -rf /usr/share/phpmyadmin/
2022-10-19 09:45:09 -07:00
sudo systemctl restart apache2
2022-10-23 13:29:22 -07:00
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
2022-10-19 09:45:09 -07:00
done
2022-10-19 10:16:07 -07:00
sudo systemctl stop apache2
2022-10-19 10:35:39 -07:00
sudo apt remove apache2 -y
2022-10-19 10:02:50 -07:00
sudo apt-get autoremove -y
2022-10-19 09:45:09 -07:00