1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/soapbox_ynh.git synced 2024-09-03 20:26:11 +02:00
soapbox_ynh/scripts/remove

55 lines
1.7 KiB
Text
Raw Normal View History

2021-12-27 18:31:01 +01:00
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# LOAD SETTINGS
#=================================================
2021-12-31 12:17:58 +01:00
ynh_script_progression --message="Loading installation settings..." --weight=2
2021-12-27 18:31:01 +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)
#=================================================
# STANDARD REMOVE
#=================================================
# REMOVE APP MAIN DIR
#=================================================
2023-01-10 16:15:44 +01:00
ynh_script_progression --message="Removing app main directory..." --weight=2
2021-12-27 18:31:01 +01:00
# Remove the app directory securely
ynh_secure_remove --file="$final_path"
#=================================================
# REMOVE NGINX CONFIGURATION
#=================================================
2021-12-31 12:17:58 +01:00
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=2
2021-12-27 18:31:01 +01:00
# Remove the dedicated NGINX config
ynh_remove_nginx_config
#=================================================
# GENERIC FINALIZATION
#=================================================
# REMOVE DEDICATED USER
#=================================================
2023-01-10 16:15:44 +01:00
ynh_script_progression --message="Removing the dedicated system user..." --weight=2
2021-12-27 18:31:01 +01:00
# Delete a system user
ynh_system_user_delete --username=$app
#=================================================
# END OF SCRIPT
#=================================================
2021-12-31 12:17:58 +01:00
ynh_script_progression --message="Removal of $app completed" --last