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

68 lines
2 KiB
Text
Raw Normal View History

2017-01-28 22:50:08 +01:00
#!/bin/bash
2018-03-24 01:27:49 +01:00
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
2017-01-29 16:25:11 +01:00
source /usr/share/yunohost/helpers
2018-03-24 01:27:49 +01:00
#=================================================
# LOAD SETTINGS
#=================================================
2020-03-31 17:43:53 +02:00
ynh_script_progression --message="Loading installation settings..." --weight=2
2018-03-24 01:27:49 +01:00
app=$YNH_APP_INSTANCE_NAME
2020-03-31 17:43:53 +02:00
domain=$(ynh_app_setting_get --app=$app --key=domain)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
2018-03-24 01:27:49 +01:00
#=================================================
# REMOVE DEPENDENCIES
#=================================================
2020-03-31 17:43:53 +02:00
ynh_script_progression --message="Removing logrotate configuration..."
2018-03-24 01:27:49 +01:00
# Remove metapackage and its dependencies
ynh_remove_app_dependencies
#=================================================
# REMOVE APP MAIN DIR
#=================================================
# Remove the app directory securely
ynh_secure_remove "$final_path"
#=================================================
# REMOVE NGINX CONFIGURATION
#=================================================
# Remove the dedicated nginx config
ynh_remove_nginx_config
#=================================================
# REMOVE PHP-FPM CONFIGURATION
#=================================================
# Remove the dedicated php-fpm config
ynh_remove_fpm_config
2017-01-28 22:50:08 +01:00
2018-03-24 01:27:49 +01:00
#=================================================
# GENERIC FINALIZATION
#=================================================
# REMOVE DEDICATED USER
#=================================================
2020-03-31 17:43:53 +02:00
ynh_script_progression --message="Removing the dedicated system user..."
2017-01-28 22:50:08 +01:00
2018-03-24 01:27:49 +01:00
# Delete a system user
ynh_system_user_delete $app
2020-03-31 17:43:53 +02:00
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Removal of $app completed" --last