2014-10-20 18:55:53 +02:00
|
|
|
#!/bin/bash
|
2016-04-26 15:30:49 +02:00
|
|
|
|
2020-11-05 20:47:23 +01:00
|
|
|
#=================================================
|
|
|
|
# GENERIC START
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
2014-10-20 18:55:53 +02:00
|
|
|
|
2016-06-14 14:11:00 +02:00
|
|
|
source /usr/share/yunohost/helpers
|
2016-05-18 22:31:45 +02:00
|
|
|
|
2020-11-05 20:47:23 +01:00
|
|
|
#=================================================
|
|
|
|
# LOAD SETTINGS
|
|
|
|
#=================================================
|
2020-11-05 20:59:46 +01:00
|
|
|
ynh_script_progression --message="Loading installation settings..." --weight=1
|
2020-11-05 20:47:23 +01:00
|
|
|
|
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
|
|
|
|
|
|
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
|
|
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
|
|
|
|
|
|
|
#=================================================
|
2020-11-05 20:59:46 +01:00
|
|
|
# STANDARD REMOVE
|
2020-11-05 20:47:23 +01:00
|
|
|
#=================================================
|
|
|
|
# REMOVE APP MAIN DIR
|
|
|
|
#=================================================
|
2020-11-05 23:06:11 +01:00
|
|
|
ynh_script_progression --message="Removing Laverna main directory..." --weight=3
|
2020-11-05 20:47:23 +01:00
|
|
|
|
|
|
|
# Remove the app directory securely
|
|
|
|
ynh_secure_remove --file="$final_path"
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# REMOVE NGINX CONFIGURATION
|
|
|
|
#=================================================
|
2020-11-05 20:59:46 +01:00
|
|
|
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1
|
2020-11-05 20:47:23 +01:00
|
|
|
|
2020-11-05 20:59:46 +01:00
|
|
|
# Remove the dedicated NGINX config
|
2020-11-05 20:47:23 +01:00
|
|
|
ynh_remove_nginx_config
|
|
|
|
|
2021-10-01 23:47:11 +02:00
|
|
|
#=================================================
|
|
|
|
# GENERIC FINALIZATION
|
|
|
|
#=================================================
|
|
|
|
# REMOVE DEDICATED USER
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Removing the dedicated system user..." --weight=1
|
|
|
|
|
|
|
|
# Delete a system user
|
|
|
|
ynh_system_user_delete --username=$app
|
|
|
|
|
2020-11-05 20:47:23 +01:00
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
2014-10-20 18:55:53 +02:00
|
|
|
|
2020-11-05 21:05:02 +01:00
|
|
|
ynh_script_progression --message="Removal of Laverna completed" --last
|