diff --git a/scripts/backup b/scripts/backup index 0138445..57ab3e0 100755 --- a/scripts/backup +++ b/scripts/backup @@ -45,6 +45,7 @@ ynh_backup --src_path="/etc/logrotate.d/$app" # BACKUP FAIL2BAN CONFIGURATION #================================================= +ynh_backup --src_path="/var/log/nginx/$domain-access.log" ynh_backup --src_path="/etc/fail2ban/jail.d/$app.conf" ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf" diff --git a/scripts/restore b/scripts/restore index 51865cf..2a5534a 100644 --- a/scripts/restore +++ b/scripts/restore @@ -73,6 +73,7 @@ ynh_script_progression --message="Restoring fail2ban configuration..." # If it doesn't exist, create the logfile, required before configuring fail2ban log4fail2ban="/var/log/nginx/${domain}-access.log" +ynh_restore_file --origin_path="${log4fail2ban}" if [ ! -f "${log4fail2ban}" ]; then touch "${log4fail2ban}" fi