2014-08-18 18:37:19 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-09-28 18:02:52 +02:00
|
|
|
#=================================================
|
|
|
|
# GENERIC START
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
2014-08-18 18:37:19 +02:00
|
|
|
|
2020-05-28 02:23:15 +02:00
|
|
|
source _common.sh
|
2017-09-28 18:02:52 +02:00
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# LOAD SETTINGS
|
|
|
|
#=================================================
|
2022-10-16 21:36:48 +02:00
|
|
|
ynh_script_progression --message="Loading settings..." --weight=1
|
2017-09-28 18:02:52 +02:00
|
|
|
|
2023-06-08 16:33:44 +02:00
|
|
|
#REMOVEME? app=$YNH_APP_INSTANCE_NAME
|
2017-09-28 18:02:52 +02:00
|
|
|
|
2023-06-08 16:33:44 +02:00
|
|
|
#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain)
|
|
|
|
#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir)
|
2017-09-28 18:02:52 +02:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# STANDARD REMOVE
|
|
|
|
#=================================================
|
|
|
|
# REMOVE APP MAIN DIR
|
|
|
|
#=================================================
|
2023-06-08 16:33:44 +02:00
|
|
|
#REMOVEME? ynh_script_progression --message="Removing app main directory..." --weight=1
|
2017-09-28 18:02:52 +02:00
|
|
|
|
|
|
|
# Remove the app directory securely
|
2023-06-08 16:33:44 +02:00
|
|
|
#REMOVEME? ynh_secure_remove --file="$install_dir"
|
2017-09-28 18:02:52 +02:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# REMOVE NGINX CONFIGURATION
|
|
|
|
#=================================================
|
2020-12-12 17:18:50 +01:00
|
|
|
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=2
|
2017-09-28 18:02:52 +02:00
|
|
|
|
2020-12-12 17:18:50 +01:00
|
|
|
# Remove the dedicated NGINX config
|
2017-09-28 18:02:52 +02:00
|
|
|
ynh_remove_nginx_config
|
2019-02-17 20:54:53 +01:00
|
|
|
|
2021-09-09 23:53:24 +02:00
|
|
|
#=================================================
|
|
|
|
# GENERIC FINALIZATION
|
|
|
|
#=================================================
|
|
|
|
# REMOVE DEDICATED USER
|
|
|
|
#=================================================
|
2023-06-08 16:33:44 +02:00
|
|
|
#REMOVEME? ynh_script_progression --message="Removing the dedicated system user..." --weight=1
|
2021-09-09 23:53:24 +02:00
|
|
|
|
|
|
|
# Delete a system user
|
2023-06-08 16:33:44 +02:00
|
|
|
#REMOVEME? ynh_system_user_delete --username=$app
|
2021-09-09 23:53:24 +02:00
|
|
|
|
2019-02-17 20:54:53 +01:00
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
2020-05-28 02:23:15 +02:00
|
|
|
ynh_script_progression --message="Removal of $app completed" --last
|