2014-06-18 00:05:18 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-03-01 19:37:00 +01:00
|
|
|
#=================================================
|
|
|
|
# GENERIC STARTING
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
2016-06-15 23:56:35 +02:00
|
|
|
|
2017-03-19 23:03:07 +01:00
|
|
|
source _common.sh
|
2016-11-08 13:32:06 +01:00
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
2017-03-01 19:37:00 +01:00
|
|
|
#=================================================
|
|
|
|
# LOAD SETTINGS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
|
|
|
2016-12-14 16:08:29 +01:00
|
|
|
domain=$(ynh_app_setting_get $app domain)
|
2017-03-01 19:37:00 +01:00
|
|
|
db_name=$(ynh_app_setting_get $app db_name)
|
2015-11-22 14:37:01 +01:00
|
|
|
|
2017-03-01 19:37:00 +01:00
|
|
|
#=================================================
|
|
|
|
# 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-11-22 14:37:01 +01:00
|
|
|
|
2017-06-13 17:11:10 +02:00
|
|
|
ynh_secure_remove "/var/www/$app" # Suppression du dossier de l'application
|
2015-11-22 14:37:01 +01:00
|
|
|
|
2017-03-01 19:37:00 +01:00
|
|
|
#=================================================
|
|
|
|
# REMOVE THE NGINX CONFIGURATION
|
|
|
|
#=================================================
|
|
|
|
|
2017-06-13 17:11:10 +02:00
|
|
|
ynh_remove_nginx_config # Suppression de la configuration nginx
|
2015-11-22 14:37:01 +01:00
|
|
|
|
2017-03-01 19:37:00 +01:00
|
|
|
#=================================================
|
|
|
|
# REMOVE THE PHP-FPM CONFIGURATION
|
|
|
|
#=================================================
|
|
|
|
|
2017-06-13 17:11:10 +02:00
|
|
|
ynh_remove_fpm_config # Suppression de la configuration du pool php-fpm
|
2016-05-20 00:00:38 +02:00
|
|
|
|
2017-03-01 19:37:00 +01:00
|
|
|
#=================================================
|
|
|
|
# SPECIFIC REMOVE
|
|
|
|
#=================================================
|
|
|
|
# REMOVE THE CRON FILE
|
|
|
|
#=================================================
|
|
|
|
|
2017-06-13 17:11:10 +02:00
|
|
|
ynh_secure_remove "/etc/cron.d/$app"
|
2016-05-20 00:00:38 +02:00
|
|
|
|
2017-03-01 19:37:00 +01:00
|
|
|
#=================================================
|
|
|
|
# GENERIC FINALISATION
|
|
|
|
#=================================================
|
|
|
|
# REMOVE DEDICATED USER
|
|
|
|
#=================================================
|
2016-05-20 00:00:38 +02:00
|
|
|
|
2017-03-19 18:31:53 +01:00
|
|
|
ynh_system_user_delete $app
|