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
|
|
|
|
|
2021-06-26 09:23:07 +02:00
|
|
|
#=================================================
|
|
|
|
# REMOVE SERVICE INTEGRATION IN YUNOHOST
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
2021-12-21 09:56:15 +01:00
|
|
|
if ynh_exec_warn_less yunohost service status "coolwsd" >/dev/null
|
2021-06-26 09:23:07 +02:00
|
|
|
then
|
2021-12-21 09:56:15 +01:00
|
|
|
ynh_script_progression --message="Removing coolwsd service integration..." --weight=1
|
|
|
|
yunohost service remove "coolwsd"
|
2021-06-26 09:23:07 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# STOP AND REMOVE SERVICE
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Stopping and removing the systemd service..." --weight=1
|
|
|
|
|
|
|
|
# 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
|
|
|
|
2018-11-03 10:30:12 +01:00
|
|
|
#=================================================
|
|
|
|
# STANDARD REMOVE
|
|
|
|
#=================================================
|
|
|
|
# REMOVE DEPENDENCIES
|
|
|
|
#=================================================
|
2023-04-02 14:41:14 +02:00
|
|
|
ynh_script_progression --message="Removing dependencies..." --weight=1
|
2018-11-03 10:30:12 +01:00
|
|
|
|
2019-01-31 00:19:51 +01:00
|
|
|
# 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
|
2019-08-04 23:00:10 +02:00
|
|
|
|
2018-11-03 10:30:12 +01:00
|
|
|
#=================================================
|
|
|
|
# REMOVE NGINX CONFIGURATION
|
|
|
|
#=================================================
|
2021-06-26 08:19:34 +02:00
|
|
|
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1
|
2018-11-03 10:30:12 +01: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
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# SPECIFIC REMOVE
|
|
|
|
#=================================================
|
2019-08-04 23:00:10 +02:00
|
|
|
|
2018-11-03 10:30:12 +01:00
|
|
|
# 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
|
|
|
|
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
|