2018-02-25 21:45:24 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# GENERIC START
|
|
|
|
#=================================================
|
|
|
|
|
2023-09-09 11:17:52 +02:00
|
|
|
source _common.sh
|
2020-11-17 23:33:50 +01:00
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
2018-02-25 21:45:24 +01:00
|
|
|
#=================================================
|
2023-09-09 11:17:52 +02:00
|
|
|
# REMOVE SYSTEM CONFIGURATIONS
|
2018-02-25 21:45:24 +01:00
|
|
|
#=================================================
|
2023-09-09 11:17:52 +02:00
|
|
|
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
|
2018-02-25 21:45:24 +01:00
|
|
|
|
2023-09-09 11:17:52 +02:00
|
|
|
if ynh_exec_warn_less yunohost service status "$app" >/dev/null
|
|
|
|
then
|
|
|
|
ynh_script_progression --message="Removing $app service integration..." --weight=1
|
|
|
|
yunohost service remove "$app"
|
|
|
|
fi
|
2018-02-25 21:45:24 +01:00
|
|
|
|
2023-09-09 11:17:52 +02:00
|
|
|
ynh_remove_systemd_config
|
2018-02-25 21:45:24 +01:00
|
|
|
|
|
|
|
ynh_remove_nginx_config
|
|
|
|
|
2023-09-09 11:17:52 +02:00
|
|
|
ynh_remove_logrotate
|
2018-06-12 14:32:44 +02:00
|
|
|
|
2019-08-01 15:06:04 +02:00
|
|
|
ynh_remove_fail2ban_config
|
|
|
|
|
2023-09-09 11:17:52 +02:00
|
|
|
ynh_script_progression --message="Removing logs..."
|
|
|
|
ynh_secure_remove --file="/var/log/$app"
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
2020-12-07 15:11:16 +01:00
|
|
|
|
2019-10-27 14:54:35 +01:00
|
|
|
ynh_script_progression --message="Removal of $app completed" --last
|