2015-05-30 19:37:21 +02:00
|
|
|
#!/bin/bash
|
2015-12-18 14:11:35 +01:00
|
|
|
|
2017-08-05 23:16:02 +02:00
|
|
|
#=================================================
|
|
|
|
# GENERIC STARTING
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
2016-12-14 16:02:43 +01:00
|
|
|
|
2017-08-05 23:16:02 +02:00
|
|
|
source _common.sh
|
2016-12-14 16:02:43 +01:00
|
|
|
source /usr/share/yunohost/helpers
|
2015-05-30 19:37:21 +02:00
|
|
|
|
2017-08-05 23:16:02 +02:00
|
|
|
#=================================================
|
|
|
|
# LOAD SETTINGS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
|
|
|
2016-12-14 16:02:43 +01:00
|
|
|
domain=$(ynh_app_setting_get $app domain)
|
2017-08-05 23:16:02 +02:00
|
|
|
db_name=$(ynh_app_setting_get $app db_name)
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# STANDARD REMOVE
|
|
|
|
#=================================================
|
|
|
|
# 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
|
|
|
|
#=================================================
|
2015-05-30 19:37:21 +02:00
|
|
|
|
2017-08-05 23:16:02 +02:00
|
|
|
ynh_secure_remove "/var/www/$app" # Suppression du dossier de l'application
|
2016-12-14 16:02:43 +01:00
|
|
|
|
2017-08-05 23:16:02 +02:00
|
|
|
#=================================================
|
|
|
|
# REMOVE THE NGINX CONFIGURATION
|
|
|
|
#=================================================
|
2015-05-30 19:37:21 +02:00
|
|
|
|
2017-08-05 23:16:02 +02:00
|
|
|
ynh_remove_nginx_config # Suppression de la configuration nginx
|
2015-12-06 12:49:32 +01:00
|
|
|
|
2017-08-05 23:16:02 +02:00
|
|
|
#=================================================
|
|
|
|
# REMOVE THE PHP-FPM CONFIGURATION
|
|
|
|
#=================================================
|
2015-12-18 14:11:35 +01:00
|
|
|
|
2017-08-05 23:16:02 +02:00
|
|
|
ynh_remove_fpm_config # Suppression de la configuration du pool php-fpm
|
2015-12-18 14:11:35 +01:00
|
|
|
|
2017-08-05 23:16:02 +02:00
|
|
|
#=================================================
|
|
|
|
# SPECIFIC REMOVE
|
|
|
|
#=================================================
|
|
|
|
# REMOVE THE SK.PHP FILE
|
|
|
|
#=================================================
|
2016-12-14 16:02:43 +01:00
|
|
|
|
2018-05-22 20:01:55 +02:00
|
|
|
ynh_secure_remove "/etc/$app"
|
2016-05-20 00:11:46 +02:00
|
|
|
|
2017-08-05 23:16:02 +02:00
|
|
|
#=================================================
|
|
|
|
# GENERIC FINALISATION
|
|
|
|
#=================================================
|
|
|
|
# REMOVE DEDICATED USER
|
|
|
|
#=================================================
|
2016-05-20 00:11:46 +02:00
|
|
|
|
2017-08-05 23:16:02 +02:00
|
|
|
ynh_system_user_delete $app
|