2016-06-13 22:03:33 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-06-03 23:41:51 +02:00
|
|
|
#=================================================
|
|
|
|
# GENERIC START
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
2020-06-15 01:58:37 +02:00
|
|
|
source _common.sh
|
2016-06-15 23:35:36 +02:00
|
|
|
source /usr/share/yunohost/helpers
|
2016-06-13 22:03:33 +02:00
|
|
|
|
2020-06-03 23:41:51 +02:00
|
|
|
#=================================================
|
|
|
|
# LOAD SETTINGS
|
|
|
|
#=================================================
|
2020-06-04 06:27:02 +02:00
|
|
|
ynh_script_progression --message="Loading installation settings..."
|
2020-06-03 23:41:51 +02:00
|
|
|
|
2016-06-13 22:03:33 +02:00
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
|
|
|
2020-06-03 23:41:51 +02:00
|
|
|
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
|
|
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
|
|
|
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# REMOVE APP MAIN DIR
|
|
|
|
#=================================================
|
2020-06-04 05:36:19 +02:00
|
|
|
ynh_script_progression --message="Removing app main directory..."
|
2020-06-03 23:41:51 +02:00
|
|
|
|
|
|
|
# Remove the app directory securely
|
|
|
|
ynh_secure_remove --file="$final_path"
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# REMOVE NGINX CONFIGURATION
|
|
|
|
#=================================================
|
2021-03-28 18:43:58 +02:00
|
|
|
ynh_script_progression --message="Removing NGINX web server configuration..."
|
2020-06-03 23:41:51 +02:00
|
|
|
|
2021-03-28 18:43:58 +02:00
|
|
|
# Remove the dedicated NGINX config
|
2020-06-03 23:41:51 +02:00
|
|
|
ynh_remove_nginx_config
|
|
|
|
|
2021-11-12 13:03:18 +01:00
|
|
|
#=================================================
|
|
|
|
# GENERIC FINALIZATION
|
|
|
|
#=================================================
|
|
|
|
# REMOVE DEDICATED USER
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Removing the dedicated system user..."
|
|
|
|
|
|
|
|
# Delete a system user
|
|
|
|
ynh_system_user_delete --username=$app
|
|
|
|
|
2020-06-03 23:41:51 +02:00
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
2020-06-06 00:00:22 +02:00
|
|
|
ynh_script_progression --message="Removal of $app completed"
|