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

50 lines
1.6 KiB
Text
Raw Normal View History

2014-12-09 21:00:17 +01:00
#!/bin/bash
2017-03-19 18:28:38 +01:00
#=================================================
2021-02-25 23:05:04 +01:00
# GENERIC START
2017-03-19 18:28:38 +01:00
#=================================================
# 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
#=================================================
2024-02-14 13:31:37 +01:00
# REMOVE SYSTEM CONFIGURATIONS
2017-03-19 18:28:38 +01:00
#=================================================
2024-02-14 13:31:37 +01:00
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
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`)
2024-02-14 13:31:37 +01:00
if ynh_exec_warn_less yunohost service status "$app" >/dev/null; then
yunohost service remove "$app"
2016-11-30 17:49:37 +01:00
fi
2024-02-14 13:31:37 +01:00
ynh_systemd_action --service_name="$app" --action="stop" --line_match="Stopped" --log_path="systemd"
2021-03-01 22:09:37 +01:00
2024-02-14 13:31:37 +01:00
# Remove the dedicated NGINX config
ynh_remove_nginx_config
2021-03-01 22:09:37 +01:00
#=================================================
2017-03-19 18:28:38 +01:00
# REMOVE DEPENDENCIES
#=================================================
2024-02-14 13:31:37 +01:00
ynh_script_progression --message="Removing Jenkins deb packages..."
2017-03-19 18:28:38 +01:00
2019-01-13 18:07:28 +01:00
# Remove metapackage and its dependencies
2024-02-14 13:31:37 +01:00
ynh_package_autopurge "$app"
2019-01-30 15:56:18 +01:00
2021-03-04 00:37:08 +01:00
#=================================================
# SPECIFIC REMOVE
#=================================================
# REMOVE VARIOUS FILES
#=================================================
ynh_script_progression --message="Removing various files..."
# Remove a directory securely
ynh_secure_remove --file="/etc/default/jenkins"
2019-01-30 15:56:18 +01:00
#=================================================
# END OF SCRIPT
#=================================================
2021-04-10 20:50:48 +02:00
ynh_script_progression --message="Removal of $app completed"