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

54 lines
1.6 KiB
Text
Raw Normal View History

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
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
#=================================================
ynh_script_progression --message="Removal of $app completed"