2014-07-06 13:21:10 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-06-03 18:13:29 +02:00
|
|
|
#=================================================
|
|
|
|
# GENERIC STARTING
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
2017-02-15 07:46:59 +01:00
|
|
|
|
2017-06-03 18:13:29 +02:00
|
|
|
source _common.sh
|
2016-09-11 10:15:45 +02:00
|
|
|
source /usr/share/yunohost/helpers
|
2014-07-06 13:21:10 +02:00
|
|
|
|
2017-06-03 18:13:29 +02:00
|
|
|
#=================================================
|
|
|
|
# LOAD SETTINGS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
|
|
|
|
|
|
domain=$(ynh_app_setting_get $app domain)
|
|
|
|
db_name=$(ynh_app_setting_get $app db_name)
|
2016-09-11 10:15:45 +02:00
|
|
|
domain=$(ynh_app_setting_get "$app" domain)
|
2014-07-06 13:21:10 +02:00
|
|
|
|
2017-06-03 18:13:29 +02:00
|
|
|
#=================================================
|
|
|
|
# STANDARD REMOVE
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# REMOVE THE MYSQL DB
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
ynh_mysql_remove_db "$app" "$db_name"
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# REMOVE APP MAIN DIR
|
|
|
|
#=================================================
|
2016-09-11 10:15:45 +02:00
|
|
|
|
2017-06-03 18:13:29 +02:00
|
|
|
ynh_secure_remove "/var/www/$app"
|
2016-09-11 10:15:45 +02:00
|
|
|
|
2017-06-18 18:24:10 +02:00
|
|
|
#=================================================
|
|
|
|
# REMOVE FAIL2BAN CONFIGURATION
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
ynh_remove_fail2ban_config
|
|
|
|
|
2017-06-03 18:13:29 +02:00
|
|
|
#=================================================
|
|
|
|
# REMOVE NGINX AND PHP-FPM CONFIGURATION
|
|
|
|
#=================================================
|
2017-02-08 18:32:46 +01:00
|
|
|
|
2017-06-03 18:13:29 +02:00
|
|
|
ynh_remove_fpm_config
|
|
|
|
ynh_remove_nginx_config
|
2016-09-11 10:15:45 +02:00
|
|
|
|
2017-06-03 18:13:29 +02:00
|
|
|
#=================================================
|
|
|
|
# REMOVE DEDICATED USER
|
|
|
|
#=================================================
|
2016-09-11 10:15:45 +02:00
|
|
|
|
2017-06-03 18:13:29 +02:00
|
|
|
ynh_system_user_delete $app
|