From 84e8921a18881a3b20a6aec919c65356d8209be4 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sun, 10 Sep 2023 23:16:52 +0200 Subject: [PATCH] Create the logfile, required before configuring fail2ban --- scripts/install | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/install b/scripts/install index 6e35f95..12c3195 100755 --- a/scripts/install +++ b/scripts/install @@ -289,6 +289,9 @@ ynh_use_logrotate #================================================= ynh_script_progression --message="Configuring fail2ban..." --weight=1 +# Create the logfile, required before configuring fail2ban +touch "/var/log/${app}/${app}.log" + # Create a dedicated Fail2Ban config ynh_add_fail2ban_config --logpath="/var/log/${app}/${app}.log" --failregex="statusCode=401 path=/auth/sign_in clientIP= .* msg=\"Unauthorized:" --max_retry=5