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

54 lines
1.7 KiB
Text
Raw Normal View History

#!/bin/bash
2017-10-06 16:35:33 +02:00
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# STANDARD REMOVE
#=================================================
2020-11-03 15:33:26 +01:00
# REMOVE SERVICE INTEGRATION IN YUNOHOST
2017-10-06 16:35:33 +02:00
#=================================================
2020-11-03 15:33: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
2017-10-06 16:35:33 +02:00
then
2020-11-03 16:07:39 +01:00
ynh_script_progression --message="Removing $app service integration..." --weight=2
2017-10-06 16:35:33 +02:00
yunohost service remove $app
fi
#=================================================
2020-11-03 15:33:26 +01:00
# STOP AND REMOVE SERVICE
2017-10-06 16:31:38 +02:00
#=================================================
2020-11-03 16:07:39 +01:00
ynh_script_progression --message="Stopping and removing the systemd service..." --weight=1
2017-10-06 16:31:38 +02:00
2020-11-03 15:33:26 +01:00
# Remove the dedicated systemd config
ynh_remove_systemd_config
2017-10-06 16:35:33 +02:00
#=================================================
2020-11-03 15:33:26 +01:00
# REMOVE DEPENDENCIES
2017-10-06 16:35:33 +02:00
#=================================================
2023-03-27 18:43:59 +02:00
#REMOVEME? ynh_script_progression --message="Removing dependencies..." --weight=2
2017-10-06 16:35:33 +02:00
2020-11-03 15:33:26 +01:00
# Remove metapackage and its dependencies
2021-09-08 10:28:31 +02:00
ynh_remove_nodejs
2017-10-06 16:35:33 +02:00
#=================================================
# REMOVE NGINX CONFIGURATION
#=================================================
2020-11-03 16:07:39 +01:00
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1
2017-10-06 16:35:33 +02:00
2020-11-03 16:07:39 +01:00
# Remove the dedicated NGINX config
2017-10-06 16:35:33 +02:00
ynh_remove_nginx_config
#=================================================
2020-11-03 15:33:26 +01:00
# END OF SCRIPT
2017-10-06 16:35:33 +02:00
#=================================================
2020-11-03 16:07:39 +01:00
ynh_script_progression --message="Removal of $app completed" --last