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

46 lines
1.3 KiB
Text
Raw Normal View History

2016-09-09 11:07:28 +02:00
#!/bin/bash
2018-04-14 22:02:50 +02:00
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
2018-04-14 22:02:50 +02:00
source _common.sh
2017-09-17 11:03:01 +02:00
source /usr/share/yunohost/helpers
2016-09-09 11:07:28 +02:00
2018-04-14 22:02:50 +02:00
#=================================================
2023-05-22 23:31:46 +02:00
# REMOVE SYSTEM CONFIGURATIONS
2018-04-14 22:02:50 +02:00
#=================================================
2023-05-22 23:31:46 +02:00
# REMOVE SYSTEMD SERVICE
2022-02-09 00:51:15 +01:00
#=================================================
2023-05-22 23:31:46 +02:00
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
2022-02-09 00:51:15 +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
then
2022-10-03 08:37:22 +02:00
ynh_script_progression --message="Removing $app service integration..." --weight=1
2022-02-09 00:51:15 +01:00
yunohost service remove $app
fi
2018-04-14 22:02:50 +02:00
# Remove the dedicated systemd config
ynh_remove_systemd_config
2022-02-09 00:51:15 +01:00
# Remove the app-specific logrotate config
ynh_remove_logrotate
2020-04-11 14:18:16 +02:00
2022-02-09 00:51:15 +01:00
# Remove the dedicated NGINX config
2018-04-14 22:02:50 +02:00
ynh_remove_nginx_config
2016-09-09 11:07:28 +02:00
2022-02-09 00:51:15 +01:00
# Remove metapackage and its dependencies
ynh_remove_nodejs
# Remove the log files
ynh_secure_remove --file="/var/log/$app"
2020-12-13 21:40:17 +01:00
#=================================================
# END OF SCRIPT
#=================================================
2020-05-03 14:03:03 +02:00
2022-10-03 08:37:22 +02:00
ynh_script_progression --message="Removal of $app completed" --last