2017-12-08 00:35:52 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
source _common.sh
|
2018-03-31 12:09:27 +02:00
|
|
|
source /usr/share/yunohost/helpers
|
2017-12-08 00:35:52 +01:00
|
|
|
|
2023-12-31 10:20:32 +01:00
|
|
|
#=================================================
|
|
|
|
# REMOVE SYSTEM CONFIGURATIONS
|
|
|
|
#=================================================
|
|
|
|
# REMOVE SYSTEMD SERVICE
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
|
|
|
|
|
2020-02-23 19:42:08 +01:00
|
|
|
if ynh_exec_warn_less yunohost service status $app >/dev/null
|
2019-04-03 00:48:08 +02:00
|
|
|
then
|
2021-01-13 20:59:06 +01:00
|
|
|
ynh_script_progression --message="Removing $app service integration..."
|
2019-06-03 22:37:54 +02:00
|
|
|
yunohost service remove $app
|
2019-04-03 00:48:08 +02:00
|
|
|
fi
|
|
|
|
|
2017-12-08 00:35:52 +01:00
|
|
|
# Remove the dedicated systemd config
|
|
|
|
ynh_remove_systemd_config
|
|
|
|
|
2022-01-07 04:42:28 +01:00
|
|
|
# Remove the app-specific logrotate config
|
|
|
|
ynh_remove_logrotate
|
|
|
|
|
2021-12-24 09:22:23 +01:00
|
|
|
ynh_redis_remove_db "$redis_db"
|
|
|
|
|
2021-04-09 23:37:52 +02:00
|
|
|
# Remove the dedicated NGINX config
|
2017-12-08 00:35:52 +01:00
|
|
|
ynh_remove_nginx_config
|
|
|
|
|
2022-01-07 04:42:28 +01:00
|
|
|
# Remove metapackage and its dependencies
|
|
|
|
ynh_remove_nodejs
|
2022-02-08 01:41:44 +01:00
|
|
|
|
|
|
|
# Remove the log files
|
|
|
|
ynh_secure_remove --file="/var/log/$app"
|
|
|
|
|
2019-04-03 00:48:08 +02:00
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
2020-06-01 03:40:44 +02:00
|
|
|
ynh_script_progression --message="Removal of $app completed"
|