2014-07-20 14:09:41 +02:00
|
|
|
#!/bin/bash
|
2014-12-22 18:56:59 +01:00
|
|
|
app=kanboard
|
2014-07-20 14:09:41 +02:00
|
|
|
|
2014-12-22 18:56:59 +01:00
|
|
|
# Retrieve arguments
|
|
|
|
domain=$(sudo yunohost app setting $app domain)
|
2014-07-20 14:09:41 +02:00
|
|
|
root_pwd=$(sudo cat /etc/yunohost/mysql)
|
|
|
|
|
2014-12-22 18:56:59 +01:00
|
|
|
# Remove sources
|
|
|
|
sudo rm -rf /var/www/$app
|
2014-07-20 14:09:41 +02:00
|
|
|
|
2014-12-22 18:56:59 +01:00
|
|
|
# Remove database
|
|
|
|
mysql -u root -p$root_pwd -e "DROP DATABASE $app ; DROP USER $app@localhost ;"
|
2014-07-20 18:10:20 +02:00
|
|
|
|
2014-12-22 18:56:59 +01:00
|
|
|
# Remove configuration files
|
|
|
|
sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf
|
2015-10-20 15:44:33 +02:00
|
|
|
sudo rm -f /etc/php5/fpm/pool.d/$app.conf
|
2014-12-22 18:56:59 +01:00
|
|
|
|
|
|
|
# Restart services
|
2015-10-20 15:44:33 +02:00
|
|
|
sudo service php5-fpm restart
|
2014-07-20 14:09:41 +02:00
|
|
|
sudo service nginx reload
|
|
|
|
sudo yunohost app ssowatconf
|