2014-08-26 00:49:46 +02:00
|
|
|
#!/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
|
2014-08-26 00:49:46 +02:00
|
|
|
|
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
|
|
|
#=================================================
|
2014-08-26 00:49:46 +02:00
|
|
|
|
2020-11-03 16:07:39 +01:00
|
|
|
ynh_script_progression --message="Removal of $app completed" --last
|