From 006211049d4f2fc1a01d7a4b6c93b07353d0144e Mon Sep 17 00:00:00 2001 From: Gofannon Date: Sun, 21 Aug 2022 01:21:38 +0200 Subject: [PATCH] apply 'example_ynh' : dependencies + nginx block moved --- scripts/remove | 8 ++++++++ scripts/restore | 12 ++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/scripts/remove b/scripts/remove index b0d36b7..e2c981a 100755 --- a/scripts/remove +++ b/scripts/remove @@ -45,6 +45,14 @@ ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=2 # Remove the dedicated PHP-FPM config ynh_remove_fpm_config +#================================================= +# REMOVE DEPENDENCIES +#================================================= +ynh_script_progression --message="Removing dependencies..." --weight=1 + +# Remove metapackage and its dependencies if no other package need them +ynh_remove_app_dependencies + #================================================= # REMOVE FAIL2BAN CONFIGURATION #================================================= diff --git a/scripts/restore b/scripts/restore index 0f7e0c0..bfe1bca 100755 --- a/scripts/restore +++ b/scripts/restore @@ -45,12 +45,6 @@ test ! -d $final_path \ #================================================= # STANDARD RESTORATION STEPS -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= - -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" - #================================================= # RECREATE THE DEDICATED USER #================================================= @@ -121,6 +115,12 @@ ynh_script_progression --message="Restoring the Fail2Ban configuration..." --wei ynh_restore_file --origin_path="/etc/fail2ban/jail.d/$app.conf" ynh_restore_file --origin_path="/etc/fail2ban/filter.d/$app.conf" ynh_systemd_action --action=restart --service_name=fail2ban +#================================================= +# RESTORE THE NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1 + +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # GENERIC FINALIZATION