From 3fb259d9adafd54d1d14d301ad66963f0a0af0df Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 6 Aug 2019 02:16:16 +0200 Subject: [PATCH] Fix fail2ban during restore --- scripts/restore | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/restore b/scripts/restore index 8f0f901..b464e52 100644 --- a/scripts/restore +++ b/scripts/restore @@ -78,6 +78,11 @@ chown -R "$app":"$app" /var/log/$app #================================================= ynh_script_progression --message="Restoring the fail2ban configuration..." --time --weight=1 +# Create a dedicated fail2ban config +mkdir -p "/var/log/$app" +chown -R "$app":"$app" "/var/log/$app" +touch /var/log/$app/$app.log + ynh_restore_file "/etc/fail2ban/jail.d/$app.conf" ynh_restore_file "/etc/fail2ban/filter.d/$app.conf" ynh_systemd_action --action=restart --service_name=fail2ban