2015-08-23 17:33:13 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-02-17 13:10:19 +01:00
|
|
|
source .fonctions # Charge les fonctions génériques habituellement utilisées dans le script
|
2015-08-23 17:33:13 +02:00
|
|
|
|
2017-02-17 13:10:19 +01:00
|
|
|
# Récupère les infos de l'application.
|
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
2015-08-23 17:33:13 +02:00
|
|
|
|
2017-02-17 13:10:19 +01:00
|
|
|
# Source app helpers
|
|
|
|
source /usr/share/yunohost/helpers
|
2015-08-23 17:33:13 +02:00
|
|
|
|
2017-02-17 13:10:19 +01:00
|
|
|
domain=$(ynh_app_setting_get $app domain)
|
|
|
|
db_user=$(ynh_app_setting_get $app db_user)
|
|
|
|
|
|
|
|
REMOVE_BDD $db_user # Suppression de la base de donnée et de l'utilisateur associé.
|
|
|
|
|
|
|
|
SECURE_REMOVE '/var/www/$app' # Suppression du dossier de l'application
|
|
|
|
|
|
|
|
REMOVE_NGINX_CONF # Suppression de la configuration nginx
|
|
|
|
|
|
|
|
REMOVE_FPM_CONF # Suppression de la configuration du pool php-fpm
|
2015-08-23 17:33:13 +02:00
|
|
|
|
|
|
|
# Remove poller cron job
|
|
|
|
sudo rm -f /etc/cron.d/poller-cron
|
|
|
|
|
2017-02-17 21:57:47 +01:00
|
|
|
# Restore php.ini as it was before installing hubzilla
|
|
|
|
#sudo sed -i 's/,,/pcntl_exec/g' /etc/php5/fpm/php.ini
|
2017-02-17 13:10:19 +01:00
|
|
|
|
|
|
|
# Reload services after cleaning
|
2017-02-17 21:55:01 +01:00
|
|
|
sudo service php5-fpm reload
|
2015-08-23 17:33:13 +02:00
|
|
|
sudo service nginx reload
|
2017-02-17 13:10:19 +01:00
|
|
|
|
|
|
|
# Régénère la configuration de SSOwat
|
2015-08-23 17:33:13 +02:00
|
|
|
sudo yunohost app ssowatconf
|
2017-02-17 13:10:19 +01:00
|
|
|
|
|
|
|
echo -e "\e[0m" # Restore normal color
|