2016-06-13 22:03:33 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-06-03 23:41:51 +02:00
|
|
|
#=================================================
|
|
|
|
# GENERIC START
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
2016-06-15 23:35:36 +02:00
|
|
|
source /usr/share/yunohost/helpers
|
2016-06-13 22:03:33 +02:00
|
|
|
|
2020-06-03 23:41:51 +02:00
|
|
|
#=================================================
|
|
|
|
# LOAD SETTINGS
|
|
|
|
#=================================================
|
2020-06-04 06:27:02 +02:00
|
|
|
ynh_script_progression --message="Loading installation settings..."
|
2020-06-03 23:41:51 +02:00
|
|
|
|
2016-06-13 22:03:33 +02:00
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
|
|
|
2020-06-03 23:41:51 +02:00
|
|
|
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
|
|
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
|
|
|
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# REMOVE APP MAIN DIR
|
|
|
|
#=================================================
|
2020-06-04 05:36:19 +02:00
|
|
|
ynh_script_progression --message="Removing app main directory..."
|
2020-06-03 23:41:51 +02:00
|
|
|
|
|
|
|
# Remove the app directory securely
|
|
|
|
ynh_secure_remove --file="$final_path"
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# REMOVE NGINX CONFIGURATION
|
|
|
|
#=================================================
|
2020-06-04 06:27:02 +02:00
|
|
|
ynh_script_progression --message="Removing nginx web server configuration..."
|
2020-06-03 23:41:51 +02:00
|
|
|
|
|
|
|
# Remove the dedicated nginx config
|
|
|
|
ynh_remove_nginx_config
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# RELOAD NGINX
|
|
|
|
#=================================================
|
2020-06-04 06:27:02 +02:00
|
|
|
ynh_script_progression --message="Reloading nginx web server..."
|
2020-06-03 23:41:51 +02:00
|
|
|
ynh_systemd_action --service_name=nginx --action=reload
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
ynh_script_progression --message="Removal of $app completed" --time --last
|
|
|
|
|
|
|
|
|
2016-06-13 22:03:33 +02:00
|
|
|
|
|
|
|
|