2023-09-21 15:11:59 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# GENERIC START
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# REMOVE SYSTEM CONFIGURATIONS
|
|
|
|
#=================================================
|
2023-09-21 16:29:54 +02:00
|
|
|
# REMOVE SYSTEMD SERVICE
|
2023-09-21 15:11:59 +02:00
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
|
|
|
|
|
|
|
|
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
2024-01-31 16:07:17 +01:00
|
|
|
if ynh_exec_warn_less yunohost service status "$app" >/dev/null; then
|
2023-09-26 21:21:32 +02:00
|
|
|
yunohost service remove "$app"
|
2023-09-21 15:11:59 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
ynh_remove_systemd_config
|
|
|
|
|
|
|
|
ynh_remove_nginx_config
|
|
|
|
|
|
|
|
ynh_remove_logrotate
|
|
|
|
|
|
|
|
ynh_remove_fail2ban_config
|
|
|
|
|
|
|
|
ynh_secure_remove --file="/var/log/$app"
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
ynh_script_progression --message="Removal of $app completed" --last
|