2016-08-15 15:38:50 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-02-08 17:25:54 +01:00
|
|
|
#=================================================
|
|
|
|
# GENERIC START
|
|
|
|
#=================================================
|
2018-02-07 00:31:25 +01:00
|
|
|
# IMPORT GENERIC HELPERS
|
2020-10-11 23:51:25 +02:00
|
|
|
#=================================================
|
|
|
|
|
|
|
|
source _common.sh
|
2018-02-07 00:31:25 +01:00
|
|
|
source /usr/share/yunohost/helpers
|
2017-04-05 21:06:22 +02:00
|
|
|
|
2018-02-08 17:25:54 +01:00
|
|
|
#=================================================
|
|
|
|
# STANDARD REMOVE
|
|
|
|
#=================================================
|
2020-10-11 23:51:25 +02:00
|
|
|
# REMOVE SERVICE INTEGRATION IN YUNOHOST
|
|
|
|
#=================================================
|
|
|
|
|
2020-12-06 15:23:22 +01:00
|
|
|
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
2020-10-11 23:51:25 +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
|
|
|
|
|
|
|
|
# Remove the dedicated systemd config
|
|
|
|
ynh_remove_systemd_config
|
2016-08-15 15:38:50 +02:00
|
|
|
|
2018-02-07 00:31:25 +01:00
|
|
|
# Remove the app-specific logrotate config
|
|
|
|
ynh_remove_logrotate
|
|
|
|
|
2020-12-06 14:50:47 +01:00
|
|
|
# Remove the dedicated NGINX config
|
2018-02-07 00:31:25 +01:00
|
|
|
ynh_remove_nginx_config
|
2016-08-15 15:38:50 +02:00
|
|
|
|
2022-04-10 13:42:21 +02:00
|
|
|
ynh_secure_remove --file="/var/log/$app"
|
|
|
|
|
2020-10-11 23:51:25 +02:00
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
2016-08-15 15:38:50 +02:00
|
|
|
|
2020-10-11 23:51:25 +02:00
|
|
|
ynh_script_progression --message="Removal of $app completed" --last
|