2016-06-27 10:27:19 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-10-13 23:38:00 +02:00
|
|
|
#=================================================
|
|
|
|
# GENERIC START
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
2016-06-27 10:27:19 +02:00
|
|
|
|
2020-10-13 23:38:00 +02:00
|
|
|
source _common.sh
|
2016-06-27 10:27:19 +02:00
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
2020-10-13 23:38:00 +02:00
|
|
|
#=================================================
|
|
|
|
# LOAD SETTINGS
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Loading installation settings..." --time --weight=1
|
|
|
|
|
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
|
|
|
|
|
|
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
|
|
|
port=$(ynh_app_setting_get --app=$app --key=port)
|
|
|
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# STANDARD REMOVE
|
|
|
|
#=================================================
|
|
|
|
# REMOVE SERVICE INTEGRATION IN YUNOHOST
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
# Remove the service from the list of services known by Yunohost (added from `yunohost service add`)
|
|
|
|
if ynh_exec_warn_less yunohost service status $app >/dev/null
|
|
|
|
then
|
|
|
|
ynh_script_progression --message="Removing $app service integration..." --time --weight=1
|
|
|
|
yunohost service remove $app
|
|
|
|
fi
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# REMOVE APP MAIN DIR
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Removing app main directory..." --time --weight=1
|
|
|
|
|
|
|
|
# Remove the app directory securely
|
|
|
|
ynh_secure_remove --file="$final_path"
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# REMOVE NGINX CONFIGURATION
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Removing nginx web server configuration..." --time --weight=1
|
|
|
|
|
|
|
|
# Remove the dedicated nginx config
|
|
|
|
ynh_remove_nginx_config
|
2016-06-27 10:27:19 +02:00
|
|
|
|
2020-10-13 23:38:00 +02:00
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
2016-06-27 10:27:19 +02:00
|
|
|
|
2020-10-13 23:38:00 +02:00
|
|
|
ynh_script_progression --message="Removal of $app completed" --last
|
2016-06-27 10:27:19 +02:00
|
|
|
|