2015-03-07 13:58:05 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
app=phpBB
|
2015-03-07 14:27:36 +01:00
|
|
|
|
|
|
|
db_user=$app
|
|
|
|
db_name=$app
|
|
|
|
root_pwd=$(sudo cat /etc/yunohost/mysql)
|
2015-03-07 13:58:05 +01:00
|
|
|
domain=$(sudo yunohost app setting $app domain)
|
|
|
|
|
2015-03-07 15:08:41 +01:00
|
|
|
# Remember to keep $root_pwd without a gap with -p otherwise it doesn't work
|
2015-03-07 14:46:52 +01:00
|
|
|
mysql -u root -p$root_pwd -e "DROP DATABASE $db_name ; DROP USER $db_user@localhost ;"
|
2015-03-07 13:58:05 +01:00
|
|
|
sudo rm -rf /var/www/$app
|
|
|
|
sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf
|
|
|
|
sudo rm -f /etc/php5/fpm/pool.d/$app.conf
|
|
|
|
|
|
|
|
sudo service php5-fpm restart
|
|
|
|
sudo service nginx reload
|
|
|
|
sudo yunohost app ssowatconf
|
|
|
|
|