1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/jenkins_ynh.git synced 2024-09-03 19:26:18 +02:00
jenkins_ynh/scripts/remove

57 lines
1.8 KiB
Text
Raw Normal View History

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
2021-01-06 14:47:04 +01:00
# 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
2016-11-30 17:49:37 +01:00
then
2021-01-06 14:47:04 +01:00
ynh_script_progression --message="Removing $app service integration..." --time --weight=1
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
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
#=================================================
2020-12-03 18:24:29 +01:00
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=2
2016-11-30 17:49:37 +01:00
2020-12-03 18:24:29 +01:00
# Remove the dedicated NGINX config
2019-01-13 18:07:28 +01:00
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