1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mattermost_ynh.git synced 2024-09-03 19:36:29 +02:00
mattermost_ynh/scripts/remove

42 lines
1.2 KiB
Text
Raw Normal View History

2015-10-21 13:03:49 +02:00
#!/bin/bash
2017-10-10 14:09:26 +02:00
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
2021-01-11 23:46:48 +01:00
source _common.sh
source /usr/share/yunohost/helpers
2017-10-10 14:09:26 +02:00
#=================================================
2023-03-07 09:15:56 +01:00
# REMOVE SYSTEM CONFIGURATIONS
#=================================================
2023-03-07 09:15:56 +01:00
# REMOVE SYSTEMD SERVICE
#=================================================
2023-03-07 09:15:56 +01:00
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
2021-01-11 23:46:48 +01:00
if ynh_exec_warn_less yunohost service status $app >/dev/null
then
ynh_script_progression --message="Removing $app service..." --weight=1
yunohost service remove $app
fi
2021-01-11 23:46:48 +01:00
# Remove the dedicated systemd config
ynh_remove_systemd_config
2022-06-22 11:09:45 +02:00
# Remove the app-specific logrotate config
ynh_remove_logrotate
2021-01-11 23:46:48 +01:00
# Remove the dedicated NGINX config
ynh_remove_nginx_config
2015-10-21 14:33:49 +02:00
2021-01-11 23:46:48 +01:00
ynh_secure_remove --file="/var/log/$app"
2017-10-10 14:09:26 +02:00
2021-01-11 23:46:48 +01:00
#=================================================
# END OF SCRIPT
#=================================================
2017-10-10 14:09:26 +02:00
2021-01-11 23:46:48 +01:00
ynh_script_progression --message="Removal of $app completed" --last