2017-03-25 18:31:20 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-04-05 07:21:59 +02:00
|
|
|
set -eu
|
|
|
|
|
2017-03-25 18:31:20 +01:00
|
|
|
#=================================================
|
|
|
|
# GENERIC STARTING
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# LOAD SETTINGS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
|
|
|
|
|
|
domain=$(ynh_app_setting_get $app domain)
|
|
|
|
db_name=$(ynh_app_setting_get $app db_name)
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# STANDARD REMOVE
|
|
|
|
#=================================================
|
|
|
|
# REMOVE DEPENDENCIES
|
|
|
|
#=================================================
|
|
|
|
|
2017-04-05 07:21:59 +02:00
|
|
|
# Inutile, car je n'ai rien installe comme outils
|
|
|
|
# ni de paquets complementaires.
|
|
|
|
#ynh_remove_app_dependencies
|
2017-03-25 18:31:20 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# REMOVE THE SQL BDD
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
ynh_mysql_remove_db $db_name $db_name # Suppression de la base de donnée et de l'utilisateur associé.
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# REMOVE THE MAIN DIR OF THE APP
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
SECURE_REMOVE '/var/www/$app' # Suppression du dossier de l'application
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# REMOVE THE NGINX CONFIGURATION
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
REMOVE_NGINX_CONF # Suppression de la configuration nginx
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# GENERIC FINALISATION
|
|
|
|
#=================================================
|
|
|
|
# REMOVE DEDICATED USER
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
ynh_system_user_delete $app
|