1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/domoticz_ynh.git synced 2024-09-03 18:26:17 +02:00
domoticz_ynh/scripts/remove

51 lines
1.6 KiB
Text
Raw Normal View History

2020-10-05 23:05:58 +02:00
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# STANDARD REMOVE
#=================================================
# REMOVE SERVICE INTEGRATION IN YUNOHOST
#=================================================
2023-05-27 18:13:49 +02:00
if [ "$domain" != "$mqtt_domain" ]; then
2023-02-27 23:24:05 +01:00
ynh_script_progression --message="Removing system configurations related to Mosquitto..." --weight=1
yunohost service remove mosquitto
ynh_secure_remove --file="/etc/mosquitto/conf.d"
ynh_secure_remove --file="/usr/share/yunohost/hooks/conf_regen/95-nginx_domoticz"
2024-01-31 22:51:02 +01:00
ynh_secure_remove --file="/etc/nginx/conf.d/${mqtt_domain}.d/mqtt_${app}.conf"
2023-02-27 23:24:05 +01:00
yunohost tools regen-conf postfix
ynh_secure_remove --file="/var/log/mosquitto"
fi
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
2022-05-26 09:30:42 +02:00
if ynh_exec_warn_less yunohost service status "$app" >/dev/null
2020-10-05 23:05:58 +02:00
then
2021-08-05 02:21:46 +02:00
ynh_script_progression --message="Removing $app service integration..."
2022-05-26 09:30:42 +02:00
yunohost service remove "$app"
2020-10-05 23:05:58 +02:00
fi
# Remove the dedicated systemd config
ynh_remove_systemd_config
2024-01-31 22:51:02 +01:00
ynh_secure_remove --file="/etc/nginx/conf.d/${domain}.d/api_${app}.conf"
2020-10-05 23:05:58 +02:00
ynh_remove_nginx_config
ynh_remove_logrotate
ynh_remove_fail2ban_config
2021-08-05 02:21:46 +02:00
ynh_secure_remove --file="/var/log/$app"
2020-10-05 23:05:58 +02:00
#=================================================
# END OF SCRIPT
#=================================================
2023-02-20 22:22:42 +01:00
ynh_script_progression --message="Removal of $app completed" --last