2016-04-07 00:00:41 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2016-06-15 23:57:31 +02:00
|
|
|
source .fonctions # Charge les fonctions génériques habituellement utilisées dans le script
|
|
|
|
|
2016-04-07 00:00:41 +02:00
|
|
|
# Récupère les infos de l'application.
|
2016-11-08 13:38:29 +01:00
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
|
|
|
|
|
|
# Source app helpers
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
2016-12-14 16:13:20 +01:00
|
|
|
domain=$(ynh_app_setting_get $app domain)
|
2016-04-07 00:00:41 +02:00
|
|
|
|
2016-11-08 13:13:35 +01:00
|
|
|
SECURE_REMOVE '/var/www/$app' # Suppression du dossier de l'application
|
|
|
|
|
|
|
|
SECURE_REMOVE '/opt/yunohost/$app'
|
|
|
|
|
|
|
|
SECURE_REMOVE '/etc/$app/' # Delete radicale config
|
2016-04-07 00:00:41 +02:00
|
|
|
|
2016-05-20 00:03:02 +02:00
|
|
|
# Suppression de la configuration uwsgi
|
2016-04-07 00:00:41 +02:00
|
|
|
# Stoppe le service uwsgi
|
|
|
|
sudo service uwsgi stop
|
2016-05-20 00:03:02 +02:00
|
|
|
if [ -e "/etc/uwsgi/apps-available/radicale.ini" ]; then
|
|
|
|
echo "Delete uwsgi config"
|
|
|
|
sudo rm "/etc/uwsgi/apps-available/radicale.ini"
|
|
|
|
fi
|
2016-06-22 14:11:25 +02:00
|
|
|
if [ -h "/etc/uwsgi/apps-enabled/radicale.ini" ]; then
|
2016-05-20 00:03:02 +02:00
|
|
|
echo "Delete uwsgi config"
|
|
|
|
sudo rm "/etc/uwsgi/apps-enabled/radicale.ini"
|
|
|
|
fi
|
|
|
|
|
2016-12-14 16:13:20 +01:00
|
|
|
if ynh_system_user_exists "radicale" # Test l'existence de l'utilisateur
|
2016-05-20 00:03:02 +02:00
|
|
|
then
|
|
|
|
sudo userdel radicale
|
|
|
|
fi
|
2016-04-07 00:00:41 +02:00
|
|
|
# Redémarre le service uwsgi
|
|
|
|
sudo service uwsgi start
|
|
|
|
|
2016-06-15 23:57:31 +02:00
|
|
|
REMOVE_NGINX_CONF # Suppression de la configuration nginx
|
2016-04-07 00:00:41 +02:00
|
|
|
|
2016-06-15 23:57:31 +02:00
|
|
|
REMOVE_FPM_CONF # Suppression de la configuration du pool php-fpm
|
2016-04-07 00:00:41 +02:00
|
|
|
|
2016-06-15 23:57:31 +02:00
|
|
|
REMOVE_LOGROTATE_CONF # Suppression de la configuration de logrotate
|
2016-04-07 00:00:41 +02:00
|
|
|
|
|
|
|
# Régénère la configuration de SSOwat
|
|
|
|
sudo yunohost app ssowatconf
|
|
|
|
|
2016-05-20 00:03:02 +02:00
|
|
|
echo -e "\e[0m" # Restore normal color
|