2014-12-09 21:00:17 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-03-19 18:28:38 +01:00
|
|
|
#=================================================
|
|
|
|
# GENERIC STARTING
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
2014-12-09 21:00:17 +01:00
|
|
|
|
2017-03-19 22:50:12 +01:00
|
|
|
source _common.sh
|
2016-11-30 17:49:37 +01:00
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
2017-03-19 18:28:38 +01:00
|
|
|
#=================================================
|
|
|
|
# LOAD SETTINGS
|
|
|
|
#=================================================
|
2019-05-28 00:28:01 +02:00
|
|
|
ynh_script_progression --message="Loading installation settings..." --weight=4
|
2017-03-19 18:28:38 +01:00
|
|
|
|
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
|
|
|
2019-05-28 00:28:01 +02:00
|
|
|
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
2016-11-30 17:55:46 +01:00
|
|
|
|
2017-03-19 18:28:38 +01:00
|
|
|
#=================================================
|
|
|
|
# STANDARD REMOVE
|
|
|
|
#=================================================
|
2019-01-13 18:07:28 +01:00
|
|
|
# REMOVE SERVICE FROM ADMIN PANEL
|
2017-03-19 18:28:38 +01:00
|
|
|
#=================================================
|
2016-11-30 17:49:37 +01:00
|
|
|
|
2019-01-13 18:07:28 +01:00
|
|
|
# Check if the service is declared in YunoHost
|
2019-05-28 00:28:01 +02:00
|
|
|
if yunohost service status $app >/dev/null 2>&1
|
2016-11-30 17:49:37 +01:00
|
|
|
then
|
2019-05-28 00:28:01 +02:00
|
|
|
ynh_script_progression --message="Removing $app service..."
|
2017-09-05 00:20:40 +02:00
|
|
|
yunohost service remove $app
|
2016-11-30 17:49:37 +01:00
|
|
|
fi
|
|
|
|
|
2017-03-19 18:28:38 +01:00
|
|
|
#=================================================
|
|
|
|
# REMOVE DEPENDENCIES
|
|
|
|
#=================================================
|
2019-05-28 00:28:01 +02:00
|
|
|
ynh_script_progression --message="Removing dependencies..." --weight=20
|
2017-03-19 18:28:38 +01:00
|
|
|
|
2017-05-15 14:34:58 +02:00
|
|
|
ynh_apt purge jenkins
|
2019-01-13 18:07:28 +01:00
|
|
|
# Remove metapackage and its dependencies
|
2017-03-19 18:28:38 +01:00
|
|
|
ynh_remove_app_dependencies
|
2019-05-28 00:28:01 +02:00
|
|
|
ynh_secure_remove --file="/var/lib/jenkins"
|
2017-03-19 18:28:38 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# REMOVE THE NGINX CONFIGURATION
|
|
|
|
#=================================================
|
2019-05-28 00:28:01 +02:00
|
|
|
ynh_script_progression --message="Removing nginx web server configuration..." --weight=2
|
2016-11-30 17:49:37 +01:00
|
|
|
|
2019-01-13 18:07:28 +01:00
|
|
|
# Remove the dedicated nginx config
|
|
|
|
ynh_remove_nginx_config
|
2019-01-30 15:56:18 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
2019-05-28 00:28:01 +02:00
|
|
|
ynh_script_progression --message="Removal of $app completed" --last
|