2015-05-08 12:03:12 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-08-28 16:34:15 +02:00
|
|
|
#=================================================
|
|
|
|
# GENERIC START
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
2017-04-20 19:34:26 +02:00
|
|
|
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
2017-08-28 16:34:15 +02:00
|
|
|
#=================================================
|
|
|
|
# LOAD SETTINGS
|
|
|
|
#=================================================
|
2019-05-20 17:03:46 +02:00
|
|
|
ynh_script_progression --message="Loading installation settings..." --weight=2
|
2017-08-28 16:34:15 +02:00
|
|
|
|
2017-04-20 19:34:26 +02:00
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
2015-05-08 12:03:12 +02:00
|
|
|
|
2019-05-20 17:03:46 +02:00
|
|
|
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
|
|
|
port=$(ynh_app_setting_get --app=$app --key=port)
|
2017-08-28 16:34:15 +02:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# STANDARD REMOVE
|
|
|
|
#=================================================
|
|
|
|
# REMOVE SERVICE FROM ADMIN PANEL
|
|
|
|
#=================================================
|
|
|
|
|
2019-03-04 16:23:36 +01:00
|
|
|
# Remove a service from the admin panel, added by `yunohost service add`
|
|
|
|
if yunohost service status $app >/dev/null 2>&1
|
2017-08-28 16:34:15 +02:00
|
|
|
then
|
2019-05-20 17:03:46 +02:00
|
|
|
ynh_script_progression --message="Removing $app service..."
|
2017-08-28 16:34:15 +02:00
|
|
|
yunohost service remove $app
|
|
|
|
fi
|
2015-05-08 12:03:12 +02:00
|
|
|
|
2017-08-28 16:34:15 +02:00
|
|
|
#=================================================
|
|
|
|
# REMOVE SHELLINABOX
|
|
|
|
#=================================================
|
2019-05-20 17:03:46 +02:00
|
|
|
ynh_script_progression --message="Removing shellinabox..." --weight=20
|
2015-05-08 12:10:37 +02:00
|
|
|
|
2017-08-28 16:34:15 +02:00
|
|
|
ynh_package_autopurge shellinabox
|
2015-05-08 12:13:03 +02:00
|
|
|
|
2017-08-28 16:34:15 +02:00
|
|
|
#=================================================
|
|
|
|
# REMOVE NGINX CONFIGURATION
|
|
|
|
#=================================================
|
2019-05-20 17:03:46 +02:00
|
|
|
ynh_script_progression --message="Removing nginx web server configuration..."
|
2015-05-08 12:03:12 +02:00
|
|
|
|
2017-08-28 16:34:15 +02:00
|
|
|
# Remove the dedicated nginx config
|
|
|
|
ynh_remove_nginx_config
|
2019-05-20 17:03:46 +02:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
ynh_script_progression --message="Removal of $app completed" --last
|