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

61 lines
1.9 KiB
Text
Raw Normal View History

2015-06-18 23:40:52 +02:00
#!/bin/bash
2020-06-14 06:25:54 +02:00
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
2015-06-18 23:40:52 +02:00
2020-06-14 06:25:54 +02:00
source _common.sh
2016-12-24 12:38:35 +01:00
source /usr/share/yunohost/helpers
2020-06-14 06:25:54 +02:00
#=================================================
# LOAD SETTINGS
#=================================================
ynh_script_progression --message="Loading installation settings..."
2016-12-24 12:38:35 +01:00
app=$YNH_APP_INSTANCE_NAME
2020-06-14 06:25:54 +02:00
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
#=================================================
ynh_script_progression --message="Removing app main directory..."
# Remove the app directory securely
ynh_secure_remove --file="$final_path"
#=================================================
# REMOVE NGINX CONFIGURATION
#=================================================
2020-11-17 10:19:32 +01:00
ynh_script_progression --message="Removing NGINX web server configuration..."
2020-06-14 06:25:54 +02:00
2020-11-17 10:19:32 +01:00
# Remove the dedicated NGINX config
2020-06-14 06:25:54 +02:00
ynh_remove_nginx_config
2016-12-24 12:38:35 +01:00
2020-06-14 06:25:54 +02:00
#=================================================
# REMOVE PHP-FPM CONFIGURATION
#=================================================
2020-11-17 10:19:32 +01:00
ynh_script_progression --message="Removing PHP-FPM configuration..."
2016-12-24 12:38:35 +01:00
2020-11-17 10:19:32 +01:00
# Remove the dedicated PHP-FPM config
2020-06-14 06:25:54 +02:00
ynh_remove_fpm_config
2015-06-18 23:40:52 +02:00
#=================================================
# REMOVE DEDICATED USER
#=================================================
ynh_script_progression --message="Removing the dedicated system user..."
# Delete a system user
ynh_system_user_delete --username=$app
2020-06-14 06:25:54 +02:00
#=================================================
# END OF SCRIPT
#=================================================
2015-06-18 23:40:52 +02:00
ynh_script_progression --message="Removal of $app completed" --last