2022-01-10 15:18:34 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
2023-05-23 11:08:58 +02:00
|
|
|
# REMOVE SYSTEM CONFIGURATIONS
|
2022-01-10 15:18:34 +01:00
|
|
|
#=================================================
|
2024-08-31 03:00:17 +02:00
|
|
|
# REMOVE SYSTEMD SERVICE
|
|
|
|
|
2022-01-10 15:18:34 +01:00
|
|
|
#=================================================
|
2024-08-31 03:00:17 +02:00
|
|
|
ynh_script_progression "Removing system configurations related to $app..."
|
2022-01-10 15:18:34 +01:00
|
|
|
|
|
|
|
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
2024-08-31 03:00:17 +02:00
|
|
|
if ynh_hide_warnings yunohost service status $app >/dev/null
|
2022-01-10 15:18:34 +01:00
|
|
|
then
|
2024-08-31 03:00:17 +02:00
|
|
|
ynh_script_progression "Removing $app service integration..."
|
2022-01-10 15:18:34 +01:00
|
|
|
yunohost service remove $app
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Remove the dedicated systemd config
|
2024-08-31 03:00:17 +02:00
|
|
|
ynh_config_remove_systemd
|
2022-01-10 21:33:51 +01:00
|
|
|
|
2022-01-10 15:18:34 +01:00
|
|
|
# Remove the app-specific logrotate config
|
2024-08-31 03:00:17 +02:00
|
|
|
ynh_config_remove_logrotate
|
2022-01-10 15:18:34 +01:00
|
|
|
|
|
|
|
# Remove the dedicated NGINX config
|
2024-08-31 03:00:17 +02:00
|
|
|
ynh_config_remove_nginx
|
2022-01-10 15:18:34 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
2024-08-31 03:00:17 +02:00
|
|
|
ynh_script_progression "Removal of $app completed"
|