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
|
|
|
#=================================================
|
|
|
|
# LOAD SETTINGS
|
|
|
|
#=================================================
|
2021-06-26 08:19:34 +02:00
|
|
|
ynh_script_progression --message="Loading installation settings..." --weight=1
|
2018-11-03 10:30:12 +01:00
|
|
|
|
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
|
|
|
2019-08-04 23:00:10 +02:00
|
|
|
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
|
|
|
port=$(ynh_app_setting_get --app=$app --key=port)
|
2018-11-03 10:30:12 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# STANDARD REMOVE
|
|
|
|
#=================================================
|
|
|
|
# REMOVE DEPENDENCIES
|
|
|
|
#=================================================
|
2021-06-26 08:19:34 +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 metapackage and its dependencies
|
|
|
|
ynh_remove_app_dependencies
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# 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
|
|
|
|
|
|
|
# Remove a directory securely
|
|
|
|
ynh_secure_remove --file="/etc/apt/sources.list.d/collabora.list"
|
2017-06-21 11:34:24 +02:00
|
|
|
|
2018-11-03 10:30:12 +01:00
|
|
|
# Remove a directory securely
|
2020-04-16 01:53:52 +02:00
|
|
|
ynh_secure_remove --file="/etc/loolwsd"
|
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
|