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

65 lines
2.1 KiB
Text
Raw Normal View History

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
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
app=$YNH_APP_INSTANCE_NAME
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)
2021-11-25 19:38:26 +01:00
#=================================================
# REMOVE SERVICE INTEGRATION IN YUNOHOST
#=================================================
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
2021-11-25 19:38:26 +01:00
dpkg -r duniter
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