2017-04-08 02:04:27 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
2019-03-19 22:54:41 +00:00
|
|
|
source _common.sh
|
2019-08-10 22:20:48 +00:00
|
|
|
source ynh_add_swap
|
2019-04-06 14:08:48 +00:00
|
|
|
source /usr/share/yunohost/helpers
|
2018-05-01 16:49:32 +00:00
|
|
|
|
|
|
|
|
#=================================================
|
2024-02-24 22:28:27 +00:00
|
|
|
# REMOVE SYSTEM CONFIGURATIONS
|
2018-05-01 16:49:32 +00:00
|
|
|
#=================================================
|
2025-08-21 08:42:04 +00:00
|
|
|
ynh_script_progression "Removing system configurations related to $app..."
|
2017-04-08 02:04:27 +00:00
|
|
|
|
2021-04-09 22:18:53 +00:00
|
|
|
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
2025-09-01 08:12:59 +00:00
|
|
|
if ynh_hide_warnings yunohost service status "$app-web" >/dev/null; then
|
2018-05-01 16:49:32 +00:00
|
|
|
yunohost service remove "$app-web"
|
2017-04-10 02:55:10 +00:00
|
|
|
fi
|
|
|
|
|
|
2025-09-01 08:12:59 +00:00
|
|
|
if ynh_hide_warnings yunohost service status "$app-sidekiq" >/dev/null; then
|
2018-05-01 16:49:32 +00:00
|
|
|
yunohost service remove "$app-sidekiq"
|
2017-04-10 02:55:10 +00:00
|
|
|
fi
|
|
|
|
|
|
2025-09-01 08:12:59 +00:00
|
|
|
if ynh_hide_warnings yunohost service status "$app-streaming" >/dev/null; then
|
2018-05-01 16:49:32 +00:00
|
|
|
yunohost service remove "$app-streaming"
|
2017-04-10 02:55:10 +00:00
|
|
|
fi
|
|
|
|
|
|
2019-03-18 03:22:38 +00:00
|
|
|
# Remove the dedicated systemd config
|
2025-08-25 05:55:20 +00:00
|
|
|
ynh_config_remove_systemd "$app-web"
|
|
|
|
|
ynh_config_remove_systemd "$app-sidekiq"
|
|
|
|
|
ynh_config_remove_systemd "$app-streaming"
|
2018-05-01 16:49:32 +00:00
|
|
|
|
2021-04-09 22:18:53 +00:00
|
|
|
# Remove the dedicated NGINX config
|
2025-08-21 08:42:04 +00:00
|
|
|
ynh_config_remove_nginx
|
2018-05-01 16:49:32 +00:00
|
|
|
|
2024-02-24 22:28:27 +00:00
|
|
|
# Remove a cron file
|
2025-08-21 08:42:04 +00:00
|
|
|
ynh_safe_rm "/etc/cron.d/$app"
|
2024-02-24 22:28:27 +00:00
|
|
|
|
|
|
|
|
# Remote logrotate config
|
2025-08-21 08:42:04 +00:00
|
|
|
ynh_config_remove_logrotate
|
2022-01-07 00:25:26 +00:00
|
|
|
|
|
|
|
|
# Remove metapackage and its dependencies
|
2025-08-21 08:42:04 +00:00
|
|
|
ynh_ruby_remove
|
|
|
|
|
ynh_nodejs_remove
|
2019-08-10 22:20:48 +00:00
|
|
|
|
|
|
|
|
# Remove swap
|
|
|
|
|
ynh_del_swap
|
2018-05-01 16:49:32 +00:00
|
|
|
|
2019-03-18 03:22:38 +00:00
|
|
|
#=================================================
|
|
|
|
|
# END OF SCRIPT
|
|
|
|
|
#=================================================
|
|
|
|
|
|
2025-08-21 08:42:04 +00:00
|
|
|
ynh_script_progression "Removal of $app completed"
|