2017-06-09 14:03:32 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
2019-04-21 15:32:30 +02:00
|
|
|
# GENERIC START
|
2017-06-09 14:03:32 +02:00
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# STANDARD REMOVE
|
|
|
|
#=================================================
|
2021-05-16 18:15:51 +02:00
|
|
|
# REMOVE SERVICE INTEGRATION IN YUNOHOST
|
2017-06-09 14:03:32 +02:00
|
|
|
#=================================================
|
|
|
|
|
2021-05-16 18:15:51 +02: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
|
2017-06-09 14:03:32 +02:00
|
|
|
then
|
2021-05-16 18:15:51 +02:00
|
|
|
ynh_script_progression --message="Removing $app service integration..."
|
2019-04-21 15:32:30 +02:00
|
|
|
yunohost service remove $app
|
2017-06-09 14:03:32 +02:00
|
|
|
fi
|
|
|
|
|
2019-04-21 15:32:30 +02:00
|
|
|
# Remove the dedicated systemd config
|
|
|
|
ynh_remove_systemd_config
|
2017-06-09 14:03:32 +02:00
|
|
|
|
2022-03-13 18:11:28 +01:00
|
|
|
# Remove the app-specific logrotate config
|
|
|
|
ynh_remove_logrotate
|
2019-04-21 15:32:30 +02:00
|
|
|
|
2021-05-16 18:15:51 +02:00
|
|
|
# Remove the log files
|
|
|
|
ynh_secure_remove --file="/var/log/$app"
|
|
|
|
|
2019-04-21 15:32:30 +02:00
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
2020-12-03 11:19:43 +01:00
|
|
|
ynh_script_progression --message="Removal of $app completed"
|