1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/spip_ynh.git synced 2024-09-03 20:25:59 +02:00
spip_ynh/scripts/remove

26 lines
739 B
Text
Raw Normal View History

2015-04-28 17:32:31 +02:00
#!/bin/bash
2017-02-21 04:04:26 +01:00
# Exit on command errors and treat unset variables as an error
2017-02-21 04:23:47 +01:00
set -u
2017-02-21 04:04:26 +01:00
2016-09-20 01:51:28 +02:00
source .fonctions # Charge les fonctions génériques habituellement utilisées dans le script
2016-08-30 00:22:47 +02:00
2016-09-20 01:51:28 +02:00
# Source app helpers
2016-08-30 00:22:47 +02:00
source /usr/share/yunohost/helpers
2016-09-20 01:51:28 +02:00
# Récupère les infos de l'application.
app=$YNH_APP_INSTANCE_NAME
2017-02-21 04:02:03 +01:00
domain=$(ynh_app_setting_set $app domain)
2016-09-20 01:51:28 +02:00
REMOVE_BDD $app # Suppression de la base de donnée et de l'utilisateur associé.
2017-02-21 04:52:10 +01:00
SECURE_REMOVE '/var/www/$app' # Suppression du dossier de l'application
2016-09-20 01:51:28 +02:00
REMOVE_NGINX_CONF # Suppression de la configuration nginx
2016-08-30 00:22:47 +02:00
2016-09-20 01:51:28 +02:00
REMOVE_FPM_CONF # Suppression de la configuration du pool php-fpm
2015-04-28 17:32:31 +02:00
2016-09-20 01:51:28 +02:00
# Régénère la configuration de SSOwat
sudo yunohost app ssowatconf
2016-09-20 01:51:28 +02:00
echo -e "\e[0m" # Restore normal color