2014-06-13 11:22:25 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-07-16 10:19:13 +02:00
|
|
|
#=================================================
|
|
|
|
# GENERIC START
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
2014-06-13 11:22:25 +02:00
|
|
|
|
2017-07-16 10:19:13 +02:00
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
2014-06-13 17:55:42 +02:00
|
|
|
|
2017-07-16 10:19:13 +02:00
|
|
|
#=================================================
|
|
|
|
# LOAD SETTINGS
|
|
|
|
#=================================================
|
|
|
|
|
2017-07-16 11:30:16 +02:00
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
2017-07-16 10:19:13 +02:00
|
|
|
|
|
|
|
domain=$(ynh_app_setting_get $app domain)
|
|
|
|
db_name=$(ynh_app_setting_get $app db_name)
|
2018-06-04 21:28:11 +02:00
|
|
|
final_path=$(ynh_app_setting_get $app final_path)
|
|
|
|
|
2017-07-16 10:19:13 +02:00
|
|
|
|
|
|
|
# Remove a database if it exists, along with the associated user
|
|
|
|
ynh_mysql_remove_db $db_name $db_name
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# REMOVE APP MAIN DIR
|
|
|
|
#=================================================
|
|
|
|
|
2019-01-04 16:15:48 +01:00
|
|
|
# Remove the protected_urls
|
|
|
|
python3 $final_path/remove_sso_conf.py
|
|
|
|
|
2017-07-16 10:19:13 +02:00
|
|
|
# Remove the app directory securely
|
2018-06-04 21:28:11 +02:00
|
|
|
ynh_secure_remove "$final_path"
|
2017-07-16 10:19:13 +02:00
|
|
|
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# REMOVE NGINX CONFIGURATION
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
# Remove the dedicated nginx config
|
|
|
|
ynh_remove_nginx_config
|
2018-06-04 21:28:11 +02:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# REMOVE PHP-FPM CONFIGURATION
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
# Remove the dedicated php-fpm config
|
|
|
|
ynh_remove_fpm_config
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# GENERIC FINALIZATION
|
|
|
|
#=================================================
|
|
|
|
# REMOVE DEDICATED USER
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
# Delete a system user
|
|
|
|
ynh_system_user_delete $app
|