2017-11-14 16:05:26 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-01-31 16:08:58 +01:00
|
|
|
#=================================================
|
|
|
|
# GENERIC START
|
|
|
|
#=================================================
|
2022-03-13 15:22:35 +01:00
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
2018-01-31 16:08:58 +01:00
|
|
|
|
2022-03-13 15:22:35 +01:00
|
|
|
source experimental_helper.sh
|
|
|
|
source _common.sh
|
2020-11-17 23:51:51 +01:00
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
2022-03-13 15:22:35 +01:00
|
|
|
#=================================================
|
2024-01-30 16:37:46 +01:00
|
|
|
# REMOVE SYSTEM CONFIGURATIONS
|
2018-01-31 16:08:58 +01:00
|
|
|
#=================================================
|
2024-01-30 16:37:46 +01:00
|
|
|
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
|
2018-01-31 16:08:58 +01:00
|
|
|
|
2019-06-06 22:39:49 +02:00
|
|
|
# Stop service
|
2024-04-26 22:03:05 +02:00
|
|
|
ynh_systemd_action --service_name="$app.service" --action=stop
|
2024-04-27 01:08:10 +02:00
|
|
|
ynh_remove_systemd_config --service="$app"
|
|
|
|
yunohost service remove "$app"
|
2022-03-13 15:22:35 +01:00
|
|
|
|
|
|
|
# Remove the app-specific logrotate config
|
|
|
|
ynh_remove_logrotate
|
|
|
|
|
|
|
|
# Remove the dedicated NGINX config
|
|
|
|
ynh_remove_nginx_config
|
2017-11-16 21:10:21 +01:00
|
|
|
|
2022-03-13 15:22:35 +01:00
|
|
|
#=================================================
|
|
|
|
# SPECIFIC REMOVE
|
|
|
|
#=================================================
|
|
|
|
# REMOVE VARIOUS FILES
|
|
|
|
#=================================================
|
2024-01-31 19:46:18 +01:00
|
|
|
ynh_script_progression --message="Removing various files..." --weight=1
|
2017-11-14 16:05:26 +01:00
|
|
|
|
2024-04-21 12:04:09 +02:00
|
|
|
if [ "$YNH_APP_PURGE" -eq 1 ]; then
|
|
|
|
ynh_script_progression --message="Removing logs..."
|
|
|
|
ynh_secure_remove --file=/var/log/"$app"
|
|
|
|
fi
|
2022-03-13 15:22:35 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
2018-03-15 23:33:57 +01:00
|
|
|
|
2019-06-06 22:39:49 +02:00
|
|
|
ynh_script_progression --message="Removal of $app completed" --last
|