1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/collabora_ynh.git synced 2024-09-03 18:16:25 +02:00
collabora_ynh/scripts/remove

42 lines
1.3 KiB
Text
Raw Permalink Normal View History

2017-06-21 11:34:24 +02:00
#!/bin/bash
2018-11-03 10:30:12 +01:00
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
2017-06-21 11:34:24 +02:00
2018-11-03 10:30:12 +01:00
source _common.sh
2017-06-21 11:34:24 +02:00
source /usr/share/yunohost/helpers
2018-11-03 10:30:12 +01:00
#=================================================
2024-01-29 11:36:53 +01:00
# REMOVE SYSTEM CONFIGURATIONS
2021-06-26 09:23:07 +02:00
#=================================================
2024-01-29 11:36:53 +01:00
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
2021-06-26 09:23:07 +02:00
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
2024-01-29 11:36:53 +01:00
if ynh_exec_warn_less yunohost service status "coolwsd" >/dev/null; then
yunohost service remove "coolwsd"
2021-06-26 09:23:07 +02:00
fi
# Remove the dedicated systemd config
2021-12-21 09:56:15 +01:00
ynh_remove_systemd_config --service="coolwsd"
2021-06-26 09:23:07 +02:00
2020-09-22 16:57:16 +02:00
# Remove the dedicated NGINX config
2018-11-03 10:30:12 +01:00
ynh_remove_nginx_config
# Remove a directory securely
2021-12-21 09:56:15 +01:00
ynh_secure_remove --file="/etc/coolwsd"
2017-06-21 11:34:24 +02:00
2024-01-29 11:36:53 +01:00
# FIXME: is it still required?
# Fix "rm: cannot remove '/etc/apt/apt.conf.d/25loolwsd': No such file or directory"
# on apt remove
touch /etc/apt/apt.conf.d/25loolwsd
2018-11-03 10:30:12 +01:00
#=================================================
2019-08-04 23:00:10 +02:00
# END OF SCRIPT
2018-11-03 10:30:12 +01:00
#=================================================
2017-06-21 11:34:24 +02:00
2021-06-26 08:19:34 +02:00
ynh_script_progression --message="Removal of $app completed" --last