2016-03-18 18:38:54 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-08-14 22:18:22 +02:00
|
|
|
#=================================================
|
|
|
|
# GENERIC START
|
|
|
|
#=================================================
|
2022-01-14 23:57:33 +01:00
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
2016-03-18 18:38:54 +01:00
|
|
|
|
2022-01-14 23:57:33 +01:00
|
|
|
source _common.sh
|
2020-11-17 23:55:57 +01:00
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
2022-01-14 23:57:33 +01:00
|
|
|
#=================================================
|
2024-01-30 23:33:35 +01:00
|
|
|
# REMOVE SYSTEM CONFIGURATIONS
|
2022-01-14 23:57:33 +01:00
|
|
|
#=================================================
|
2024-01-30 23:33:35 +01:00
|
|
|
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
|
2016-03-18 21:00:30 +01:00
|
|
|
|
2022-01-14 23:57:33 +01:00
|
|
|
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
2024-01-31 10:33:23 +01:00
|
|
|
if ynh_exec_warn_less yunohost service status "sogo" >/dev/null; then
|
|
|
|
ynh_script_progression --message="Removing sogo service integration..." --weight=1
|
|
|
|
yunohost service remove "sogo"
|
2022-01-14 23:57:33 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Remove the dedicated systemd config
|
|
|
|
ynh_remove_systemd_config
|
|
|
|
|
|
|
|
# Remove the app-specific logrotate config
|
|
|
|
ynh_remove_logrotate
|
|
|
|
|
|
|
|
# Remove the dedicated NGINX config
|
|
|
|
ynh_remove_nginx_config
|
2018-08-14 22:18:22 +02:00
|
|
|
|
2022-01-14 23:57:33 +01:00
|
|
|
#=================================================
|
|
|
|
# SPECIFIC REMOVE
|
|
|
|
#=================================================
|
|
|
|
# REMOVE VARIOUS FILES
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Removing various files..." --weight=1
|
2021-06-29 07:55:31 +02:00
|
|
|
|
2022-01-14 23:57:33 +01:00
|
|
|
ynh_secure_remove --file="/etc/$app"
|
2020-05-24 00:32:03 +02:00
|
|
|
|
2022-01-14 23:57:33 +01:00
|
|
|
# Remove stunnel config
|
|
|
|
ynh_secure_remove --file="/etc/stunnel/$app.conf"
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
2019-06-07 23:09:30 +02:00
|
|
|
|
|
|
|
ynh_script_progression --message="Removal of $app completed" --last
|