2017-10-06 11:02:02 +02:00
|
|
|
#!/bin/bash
|
2015-02-17 03:39:33 +01:00
|
|
|
|
2017-10-06 11:02:02 +02:00
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
2024-02-29 10:11:40 +01:00
|
|
|
# REMOVE SYSTEM CONFIGURATIONS
|
2022-05-29 12:45:09 +02:00
|
|
|
#=================================================
|
2024-02-29 10:11:40 +01:00
|
|
|
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
|
2022-05-29 12:45:09 +02:00
|
|
|
|
|
|
|
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
2024-02-29 10:11:40 +01:00
|
|
|
if ynh_exec_warn_less yunohost service status "$app.target" >/dev/null; then
|
|
|
|
yunohost service remove "$app.target"
|
2022-05-29 12:45:09 +02:00
|
|
|
fi
|
|
|
|
|
2024-02-29 10:11:40 +01:00
|
|
|
ynh_remove_systemd_config
|
2022-05-29 12:45:09 +02:00
|
|
|
|
2019-12-02 21:01:24 +01:00
|
|
|
ynh_secure_remove --file="/etc/tmpfiles.d/${app}.conf"
|
2019-12-12 23:49:44 +01:00
|
|
|
ynh_secure_remove --file="/run/${app}"
|
2017-10-06 11:02:02 +02:00
|
|
|
|
2024-02-29 10:11:40 +01:00
|
|
|
_ynh_remove_systemd_target
|
2017-10-06 11:02:02 +02:00
|
|
|
|
2022-05-29 12:45:09 +02:00
|
|
|
# Remove the dedicated NGINX config
|
2017-10-06 11:02:02 +02:00
|
|
|
ynh_remove_nginx_config
|
|
|
|
|
|
|
|
#=================================================
|
2022-05-29 12:45:09 +02:00
|
|
|
# REMOVE DEPENDENCIES
|
2017-10-06 11:02:02 +02:00
|
|
|
#=================================================
|
2022-05-29 12:45:09 +02:00
|
|
|
ynh_script_progression --message="Removing dependencies..." --weight=10
|
2019-12-02 21:01:24 +01:00
|
|
|
|
2022-05-29 12:45:09 +02:00
|
|
|
# Remove metapackage and its dependencies
|
2020-07-05 19:13:50 +02:00
|
|
|
ynh_remove_ruby
|
2022-05-29 12:45:09 +02:00
|
|
|
ynh_remove_nodejs
|
2022-03-02 09:12:56 +01:00
|
|
|
|
2019-12-02 21:01:24 +01:00
|
|
|
#=================================================
|
2022-05-29 12:45:09 +02:00
|
|
|
# END OF SCRIPT
|
2019-12-02 21:01:24 +01:00
|
|
|
#=================================================
|
|
|
|
|
2022-09-26 02:56:12 +02:00
|
|
|
ynh_script_progression --message="Removal of $app completed" --last
|