1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/leed_ynh.git synced 2024-09-03 19:26:32 +02:00
leed_ynh/scripts/remove

31 lines
832 B
Text
Raw Normal View History

2014-06-18 00:05:18 +02:00
#!/bin/bash
2015-11-22 14:37:01 +01:00
app=leed
# Récupère les infos de l'application.
2014-06-18 00:05:18 +02:00
root_pwd=$(sudo cat /etc/yunohost/mysql)
2015-11-22 14:37:01 +01:00
domain=$(sudo yunohost app setting $app domain)
# Utilise '$app' comme nom d'utilisateur et de base de donnée
db_user=$app
mysql -u root -p$root_pwd -e "DROP DATABASE $db_user ; DROP USER $db_user@localhost ;"
# Suppression du dossier de l'application
sudo rm -rf /var/www/$app
# Suppression de la configuration nginx
2015-11-22 14:37:01 +01:00
sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf
2014-09-15 10:44:58 +02:00
# Retirer le cron
2015-11-22 14:37:01 +01:00
sudo rm -f /etc/cron.d/$app
# Suppression de la configuration du pool php-fpm
sudo rm -f /etc/php5/fpm/pool.d/$app.conf
sudo rm -f /etc/php5/fpm/conf.d/20-$app.ini
2015-11-22 14:37:01 +01:00
# Recharge la configuration Nginx et php5-fpm
sudo service nginx reload
2016-05-15 11:34:18 +02:00
sudo service php5-fpm reload
2015-11-22 14:37:01 +01:00
# Régénère la configuration de SSOwat
sudo yunohost app ssowatconf