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
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
|
|
|
2016-11-30 17:55:46 +01:00
|
|
|
domain=$(ynh_app_setting_get $app domain)
|
|
|
|
|
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
|
|
|
|
if yunohost service status | grep -q $app
|
2016-11-30 17:49:37 +01:00
|
|
|
then
|
2017-12-16 23:20:29 +01:00
|
|
|
ynh_print_info "Remove $app service" >&2
|
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
|
|
|
|
#=================================================
|
|
|
|
|
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
|
2018-01-04 19:28:09 +01:00
|
|
|
ynh_secure_remove "/var/lib/jenkins"
|
2017-03-19 18:28:38 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# REMOVE THE NGINX CONFIGURATION
|
|
|
|
#=================================================
|
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
|