2019-02-20 12:08:50 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# GENERIC START
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
2023-08-12 11:14:23 +02:00
|
|
|
# REMOVE SYSTEM CONFIGURATIONS
|
2019-02-20 12:08:50 +01:00
|
|
|
#=================================================
|
2023-08-12 11:14:23 +02:00
|
|
|
# REMOVE SYSTEMD SERVICE
|
2019-04-10 11:19:13 +02:00
|
|
|
#=================================================
|
2023-08-12 11:14:23 +02:00
|
|
|
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
|
2019-04-10 11:19:13 +02:00
|
|
|
|
2022-03-13 21:51:45 +01:00
|
|
|
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
2020-11-16 19:38:35 +01:00
|
|
|
if ynh_exec_warn_less yunohost service status $app >/dev/null
|
2019-04-10 11:19:13 +02:00
|
|
|
then
|
2022-05-31 01:08:23 +02:00
|
|
|
ynh_script_progression --message="Removing $app service integration..." --weight=1
|
2022-03-13 21:51:45 +01:00
|
|
|
yunohost service remove $app
|
2019-04-10 11:19:13 +02:00
|
|
|
fi
|
|
|
|
|
2023-08-12 11:14:23 +02:00
|
|
|
ynh_remove_systemd_config
|
2022-03-13 21:51:45 +01:00
|
|
|
|
|
|
|
# Remove the dedicated NGINX config
|
|
|
|
ynh_remove_nginx_config
|
2019-02-20 12:08:50 +01:00
|
|
|
|
2022-03-13 21:51:45 +01:00
|
|
|
# Remove a directory securely
|
|
|
|
ynh_secure_remove --file="/etc/$app"
|
2019-02-20 12:08:50 +01:00
|
|
|
|
2019-04-10 11:19:13 +02:00
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
2021-07-07 19:08:59 +02:00
|
|
|
ynh_script_progression --message="Removal of $app completed" --last
|