2014-08-27 23:42:00 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-10-11 15:21:19 +02:00
|
|
|
#=================================================
|
|
|
|
# GENERIC START
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
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-02-05 13:11:42 +01:00
|
|
|
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
|
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`)
|
|
|
|
if ynh_exec_warn_less yunohost service status "$app" >/dev/null; then
|
|
|
|
yunohost service remove "$app"
|
2020-10-25 09:00:51 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Remove the dedicated systemd config
|
|
|
|
ynh_remove_systemd_config
|
|
|
|
|
2024-02-05 13:11:42 +01:00
|
|
|
# Remove the dedicated nginx config
|
|
|
|
ynh_remove_nginx_config
|
|
|
|
|
2020-10-11 15:21:19 +02:00
|
|
|
#=================================================
|
|
|
|
# REMOVE APP MAIN DIR
|
|
|
|
#=================================================
|
2022-02-03 19:34:23 +01:00
|
|
|
ynh_script_progression --message="Removing Kiwiirc..." --weight=6
|
2020-10-11 15:21:19 +02:00
|
|
|
|
2022-02-03 23:55:11 +01:00
|
|
|
dpkg --purge kiwiirc
|
2022-02-03 19:34:23 +01:00
|
|
|
|
2022-02-03 22:04:18 +01:00
|
|
|
#=================================================
|
|
|
|
# REMOVE VARIOUS FILES
|
|
|
|
#=================================================
|
2022-02-03 22:16:44 +01:00
|
|
|
ynh_script_progression --message="Removing various files..." --weight=1
|
2022-02-03 22:04:18 +01:00
|
|
|
|
|
|
|
# Remove a cron file
|
|
|
|
ynh_secure_remove --file="/etc/$app"
|
|
|
|
|
2022-02-04 09:49:47 +01:00
|
|
|
# Remove the log files
|
|
|
|
ynh_secure_remove --file="/var/log/$app.log"
|
|
|
|
|
2020-10-11 15:21:19 +02:00
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
2021-09-24 07:43:11 +02:00
|
|
|
ynh_script_progression --message="Removal of $app completed" --last
|