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

62 lines
1.9 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..." --weight=1
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)
#=================================================
# REMOVE APP MAIN DIR
#=================================================
2020-11-05 13:58:06 +01:00
ynh_script_progression --message="Removing ChtickyNotes 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 PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Removing php-fpm configuration..." --weight=1
# Remove the dedicated php-fpm config
ynh_remove_fpm_config
2020-11-05 13:34:17 +01:00
#=================================================
# REMOVE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1
# Remove the dedicated NGINX config
ynh_remove_nginx_config
2020-11-26 17:57:28 +01: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 13:34:17 +01:00
#=================================================
# END OF SCRIPT
#=================================================
2020-11-05 13:58:06 +01:00
ynh_script_progression --message="Removal of ChtickyNotes completed" --last