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

51 lines
1.5 KiB
Text
Raw Normal View History

2015-09-14 17:12:17 +02:00
#!/bin/bash
2016-07-05 15:22:12 +02:00
2022-02-13 22:09:18 +01:00
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
2017-05-18 23:28:18 +02:00
source _common.sh
2022-02-13 22:09:18 +01:00
source /usr/share/yunohost/helpers
#=================================================
2024-03-20 20:49:39 +01:00
# REMOVE SYSTEM CONFIGURATIONS
2022-02-13 22:09:18 +01:00
#=================================================
ynh_script_progression "Removing system configurations related to $app..."
2016-07-05 15:22:12 +02:00
2022-02-13 22:09:18 +01:00
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
if ynh_hide_warnings yunohost service status "$app" >/dev/null; then
2024-03-20 20:49:39 +01:00
yunohost service remove "$app"
2022-02-13 22:09:18 +01:00
fi
2018-12-14 03:36:58 +01:00
2022-02-17 01:23:35 +01:00
# Remove the dedicated systemd config
ynh_config_remove_systemd
2022-02-17 01:23:35 +01:00
2022-02-13 22:09:18 +01:00
# Remove the dedicated NGINX config
ynh_config_remove_nginx
2018-09-27 00:31:17 +02:00
2022-02-13 22:09:18 +01:00
#=================================================
# REMOVE VARIOUS FILES
#=================================================
ynh_script_progression "Removing various files..."
2022-02-13 22:09:18 +01:00
2022-02-17 01:23:35 +01:00
# Remove a directory securely
ynh_safe_rm "/etc/$app"
2022-02-17 01:23:35 +01:00
# Remove the log files
#REMOVEME? (Apps should not remove their log dir during remove ... this should only happen if --purge is used, and be handled by the core...) ynh_safe_rm "/var/log/$app.log"
2022-02-17 01:23:35 +01:00
#=================================================
# REMOVE SWAP
#=================================================
2022-02-13 22:09:18 +01:00
# if ! ynh_in_ci_tests; then
# ynh_script_progression "Removing swap..."
2024-03-20 22:52:21 +01:00
# ynh_del_swap
# fi
2022-02-13 22:09:18 +01:00
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression "Removal of $app completed"