2014-08-27 23:42:00 +02:00
#!/bin/bash
2020-10-11 15:21:19 +02:00
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
2024-02-05 13:11:42 +01:00
# REMOVE SYSTEM CONFIGURATIONS
2020-10-11 15:21:19 +02:00
#=================================================
2024-08-31 00:59:03 +02:00
ynh_script_progression "Removing system configurations related to $app..."
2020-10-11 15:21:19 +02:00
2024-02-05 13:11:42 +01:00
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
2024-08-31 00:59:03 +02:00
if ynh_hide_warnings yunohost service status "$app" >/dev/null; then
2024-02-05 13:11:42 +01:00
yunohost service remove "$app"
2020-10-25 09:00:51 +01:00
fi
# Remove the dedicated systemd config
2024-08-31 00:59:03 +02:00
ynh_config_remove_systemd
2020-10-25 09:00:51 +01:00
2024-08-31 00:59:03 +02:00
ynh_config_remove_logrotate
2024-02-05 15:39:09 +01:00
2024-02-05 13:11:42 +01:00
# Remove the dedicated nginx config
2024-08-31 00:59:03 +02:00
ynh_config_remove_nginx
2024-02-05 13:11:42 +01:00
2022-02-03 22:04:18 +01:00
#=================================================
# REMOVE VARIOUS FILES
#=================================================
2024-08-31 00:59:03 +02:00
ynh_script_progression "Removing various files..."
2022-02-03 22:04:18 +01:00
2022-02-04 09:49:47 +01:00
# Remove the log files
2024-08-31 00:59:03 +02:00
#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"
2022-02-04 09:49:47 +01:00
2020-10-11 15:21:19 +02:00
#=================================================
# END OF SCRIPT
#=================================================
2024-08-31 00:59:03 +02:00
ynh_script_progression "Removal of $app completed"