2016-03-01 10:47:41 +01:00
|
|
|
#!/bin/bash
|
2016-12-06 03:09:15 +01:00
|
|
|
|
2018-11-30 14:47:44 +01:00
|
|
|
#=================================================
|
|
|
|
# GENERIC STARTING
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# LOAD SETTINGS
|
|
|
|
#=================================================
|
2023-11-02 19:00:22 +01:00
|
|
|
#REMOVEME? ynh_script_progression --message="Loading installation settings..."
|
2018-11-30 14:47:44 +01:00
|
|
|
|
2023-11-02 19:00:22 +01:00
|
|
|
#REMOVEME? app=$YNH_APP_INSTANCE_NAME
|
2016-12-06 03:09:15 +01:00
|
|
|
|
2023-11-02 19:00:22 +01:00
|
|
|
#REMOVEME? domain=$(ynh_app_setting_get $app domain)
|
|
|
|
#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get $app install_dir)
|
2016-03-01 10:47:41 +01:00
|
|
|
|
2018-11-30 14:47:44 +01:00
|
|
|
#=================================================
|
|
|
|
# STANDARD REMOVE
|
|
|
|
#=================================================
|
2021-02-08 09:32:10 +01:00
|
|
|
# REMOVE APP MAIN DIR
|
2018-11-30 14:47:44 +01:00
|
|
|
#=================================================
|
2023-11-02 19:00:22 +01:00
|
|
|
#REMOVEME? ynh_script_progression --message="Removing app main directory..."
|
2016-03-01 10:47:41 +01:00
|
|
|
|
2021-02-08 09:32:10 +01:00
|
|
|
# Remove the app directory securely
|
2023-11-02 19:00:22 +01:00
|
|
|
#REMOVEME? ynh_secure_remove --file="$install_dir"
|
2016-03-01 10:47:41 +01:00
|
|
|
|
2018-11-30 14:47:44 +01:00
|
|
|
#=================================================
|
2021-02-08 09:32:10 +01:00
|
|
|
# REMOVE NGINX CONFIGURATION
|
2018-11-30 14:47:44 +01:00
|
|
|
#=================================================
|
2021-02-08 09:32:10 +01:00
|
|
|
ynh_script_progression --message="Removing NGINX web server configuration..."
|
2016-03-01 10:47:41 +01:00
|
|
|
|
2021-02-08 09:32:10 +01:00
|
|
|
# Remove the dedicated NGINX config
|
2018-11-30 14:47:44 +01:00
|
|
|
ynh_remove_nginx_config
|
2021-02-08 09:32:10 +01:00
|
|
|
|
2022-02-04 15:41:24 +01:00
|
|
|
#=================================================
|
|
|
|
# REMOVE DEDICATED USER
|
|
|
|
#=================================================
|
2023-11-02 19:00:22 +01:00
|
|
|
#REMOVEME? ynh_script_progression --message="Removing the dedicated system user..."
|
2022-02-04 15:41:24 +01:00
|
|
|
|
|
|
|
# Delete a system user
|
2023-11-02 19:00:22 +01:00
|
|
|
#REMOVEME? ynh_system_user_delete --username=$app
|
2022-02-04 15:41:24 +01:00
|
|
|
|
2021-02-08 09:32:10 +01:00
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
ynh_script_progression --message="Removal of $app completed" --last
|