diff --git a/scripts/restore b/scripts/restore index 9f616b0..b25d172 100644 --- a/scripts/restore +++ b/scripts/restore @@ -81,6 +81,15 @@ setfacl -Rm d:g:www-data:rwX "$final_path/wp-content/temp" chmod 400 "$final_path/wp-config.php" chown $app:$app "$final_path/wp-config.php" +#================================================= +# RESTORE FAIL2BAN CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring the Fail2Ban configuration..." --weight=6 + +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 #================================================= @@ -107,15 +116,6 @@ ynh_script_progression --message="Restoring the NGINX web server configuration.. ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# RESTORE FAIL2BAN CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the Fail2Ban configuration..." --weight=6 - -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 MYSQL DATABASE #=================================================