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

64 lines
2 KiB
Text
Raw Normal View History

#!/bin/bash
2020-11-05 13:34:17 +01:00
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
2020-11-05 13:34:17 +01:00
source _common.sh
source /usr/share/yunohost/helpers
2020-11-05 13:34:17 +01:00
#=================================================
# LOAD SETTINGS
#=================================================
ynh_script_progression --message="Loading installation settings..."
2020-11-05 13:34:17 +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
2020-11-05 13:34:17 +01:00
#=================================================
# REMOVE APP MAIN DIR
#=================================================
ynh_script_progression --message="Removing app main directory..." --weight=2
2020-11-05 13:34:17 +01:00
# Remove the app directory securely
ynh_secure_remove --file="$final_path"
2020-11-26 17:57:28 +01:00
#=================================================
# REMOVE NGINX CONFIGURATION
2020-11-26 17:57:28 +01:00
#=================================================
ynh_script_progression --message="Removing NGINX web server configuration..."
2020-11-26 17:57:28 +01:00
# Remove the dedicated NGINX config
ynh_remove_nginx_config
2020-11-26 17:57:28 +01:00
2020-11-05 13:34:17 +01:00
#=================================================
# REMOVE PHP-FPM CONFIGURATION
2020-11-05 13:34:17 +01:00
#=================================================
ynh_script_progression --message="Removing PHP-FPM configuration..."
# Remove the dedicated PHP-FPM config
ynh_remove_fpm_config
2020-11-05 13:34:17 +01:00
2020-11-26 17:57:28 +01:00
#=================================================
# GENERIC FINALIZATION
#=================================================
# REMOVE DEDICATED USER
#=================================================
ynh_script_progression --message="Removing the dedicated system user..."
2020-11-26 17:57:28 +01:00
# Delete a system user
ynh_system_user_delete --username=$app
2020-11-05 13:34:17 +01:00
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Removal of $app completed" --last