1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/phpmyadmin_ynh.git synced 2024-09-03 19:56:46 +02:00
phpmyadmin_ynh/scripts/remove
2015-07-07 22:00:35 +01:00

15 lines
427 B
Bash
Executable file

#!/bin/bash
domain=$(sudo yunohost app setting phpmyadmin domain)
sudo rm -rf /var/www/phpmyadmin
sudo rm -f /etc/nginx/conf.d/$domain.d/phpmyadmin.conf
sudo rm -f /etc/php5/fpm/pool.d/phpmyadmin.conf
sudo service php5-fpm restart
sudo service nginx reload
db_user=phpmyadmin
db_name=phpmyadmin
root_pwd=$(sudo cat /etc/yunohost/mysql)
mysql -u root -p$root_pwd -e "DROP DATABASE $db_name ; DROP USER $db_user@localhost ;"