diff --git a/scripts/restore b/scripts/restore index bfe1bca..d2d391a 100755 --- a/scripts/restore +++ b/scripts/restore @@ -91,13 +91,18 @@ chown -R $app:www-data "$final_path" #================================================= # RESTORE THE PHP-FPM CONFIGURATION +# RESTORE FAIL2BAN CONFIGURATION #================================================= ynh_script_progression --message="Reconfiguring PHP-FPM..." --weight=5 ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" +ynh_script_progression --message="Restoring the Fail2Ban configuration..." --weight=7 # Recreate a dedicated php-fpm config ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$phpversion +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 #================================================= # REINSTALL DEPENDENCIES @@ -108,13 +113,8 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=1 ynh_install_app_dependencies $pkg_dependencies #================================================= -# RESTORE FAIL2BAN CONFIGURATION #================================================= -ynh_script_progression --message="Restoring the Fail2Ban configuration..." --weight=7 -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 #=================================================