1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/laverna_ynh.git synced 2024-09-03 19:36:06 +02:00
laverna_ynh/scripts/remove

54 lines
1.7 KiB
Text
Raw Normal View History

2014-10-20 18:55:53 +02:00
#!/bin/bash
2020-11-05 20:47:23 +01:00
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
2014-10-20 18:55:53 +02:00
source /usr/share/yunohost/helpers
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