2015-05-24 23:01:16 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-11-25 19:38:26 +01:00
|
|
|
#=================================================
|
|
|
|
# GENERIC START
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
2017-02-21 14:51:22 +01:00
|
|
|
|
2021-11-25 19:38:26 +01:00
|
|
|
source _common.sh
|
2016-05-31 15:26:06 +02:00
|
|
|
source /usr/share/yunohost/helpers
|
2021-11-25 19:38:26 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# LOAD SETTINGS
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Loading installation settings..." --time --weight=1
|
2016-05-31 15:26:06 +02:00
|
|
|
|
2016-06-23 13:27:00 +02:00
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
2015-12-25 21:33:56 +01:00
|
|
|
|
2021-11-25 19:38:26 +01:00
|
|
|
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
|
|
|
port=$(ynh_app_setting_get --app=$app --key=port)
|
|
|
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
2015-12-02 21:41:55 +01:00
|
|
|
|
2021-11-25 19:38:26 +01:00
|
|
|
#=================================================
|
|
|
|
# REMOVE SERVICE INTEGRATION IN YUNOHOST
|
|
|
|
#=================================================
|
2018-11-29 17:46:37 +01:00
|
|
|
|
2021-11-25 19:38:26 +01:00
|
|
|
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
|
|
|
if ynh_exec_warn_less yunohost service status $app >/dev/null
|
|
|
|
then
|
|
|
|
ynh_script_progression --message="Removing $app service integration..." --time --weight=1
|
|
|
|
yunohost service remove $app
|
|
|
|
fi
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# STOP AND REMOVE SERVICE
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Stopping and removing the systemd service..." --time --weight=1
|
|
|
|
|
|
|
|
# Remove the dedicated systemd config
|
|
|
|
ynh_remove_systemd_config
|
2016-06-28 13:55:13 +02:00
|
|
|
|
2021-11-25 19:38:26 +01:00
|
|
|
#=================================================
|
|
|
|
# REMOVE DEPENDENCIES
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Removing dependencies..." --time --weight=1
|
2015-12-02 21:41:55 +01:00
|
|
|
|
2021-11-25 19:38:26 +01:00
|
|
|
dpkg -r duniter
|
2015-12-25 21:33:56 +01:00
|
|
|
|
2021-11-25 19:38:26 +01:00
|
|
|
#=================================================
|
|
|
|
# REMOVE NGINX CONFIGURATION
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Removing NGINX web server configuration..." --time --weight=1
|
|
|
|
|
|
|
|
# Remove the dedicated NGINX config
|
|
|
|
ynh_remove_nginx_config
|
|
|
|
|
|
|
|
# Remove data and conf
|
|
|
|
rm -rf $USER/.conf/duniter
|
2020-06-11 19:00:12 +02:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
ynh_script_progression --message="Removal of $app completed" --last
|