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

61 lines
1.9 KiB
Text
Raw Normal View History

2015-04-06 17:46:57 +02:00
#!/bin/bash
2017-04-30 15:45:50 +02:00
2020-07-18 20:55:45 +02:00
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
2017-04-30 15:45:50 +02:00
2020-07-18 20:55:45 +02:00
source _common.sh
2017-04-30 15:45:50 +02:00
source /usr/share/yunohost/helpers
2020-07-18 20:55:45 +02:00
#=================================================
# LOAD SETTINGS
#=================================================
2020-09-25 16:21:33 +02:00
ynh_script_progression --message="Loading installation settings..." --weight=1
2020-07-18 20:55:45 +02:00
2017-04-30 15:45:50 +02:00
app=$YNH_APP_INSTANCE_NAME
2015-04-06 17:46:57 +02:00
2020-07-18 20:55:45 +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-09-29 09:18:38 +02:00
ynh_script_progression --message="Removing Minchat main directory..." --weight=2
2020-07-18 20:55:45 +02:00
# Remove the app directory securely
ynh_secure_remove --file="$final_path"
#=================================================
# REMOVE NGINX CONFIGURATION
#=================================================
2020-09-25 16:21:33 +02:00
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1
2020-07-18 20:55:45 +02:00
2020-09-25 16:21:33 +02:00
# Remove the dedicated NGINX config
2020-07-18 20:55:45 +02:00
ynh_remove_nginx_config
#=================================================
# REMOVE PHP-FPM CONFIGURATION
#=================================================
2020-09-25 16:21:33 +02:00
ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=1
2020-07-18 20:55:45 +02:00
2020-09-25 16:21:33 +02:00
# Remove the dedicated PHP-FPM config
2017-04-30 15:45:50 +02:00
ynh_remove_fpm_config
2015-04-06 17:46:57 +02:00
2020-07-18 20:55:45 +02:00
#=================================================
# GENERIC FINALIZATION
#=================================================
# REMOVE DEDICATED USER
#=================================================
2020-09-25 16:21:33 +02:00
ynh_script_progression --message="Removing the dedicated system user..." --weight=1
2020-07-18 20:55:45 +02:00
# Delete a system user
ynh_system_user_delete --username=$app
#=================================================
# END OF SCRIPT
#=================================================
2015-04-06 17:46:57 +02:00
2020-09-25 17:19:02 +02:00
ynh_script_progression --message="Removal of Minchat completed" --last