From 288aed693adcd1c753dd9ff6d0b692ccf7567def Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Thu, 1 Aug 2019 15:08:31 +0200 Subject: [PATCH] Use getop for fail2ban --- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 2d4f975..f635a2e 100644 --- a/scripts/install +++ b/scripts/install @@ -100,7 +100,7 @@ ynh_replace_string "__APP__" "$app" ../conf/login_source.sql ynh_mysql_connect_as "$dbuser" "$dbpass" "$dbname" < ../conf/login_source.sql # SETUP FAIL2BAN -ynh_add_fail2ban_config "/var/log/$app/$app.log" ".*Failed authentication attempt for .* from " 5 +ynh_add_fail2ban_config --logpath "/var/log/$app/$app.log" --failregex ".*Failed authentication attempt for .* from " --max_retry 5 #================================================= # GENERIC FINALIZATION diff --git a/scripts/restore b/scripts/restore index 3618823..d2fedda 100644 --- a/scripts/restore +++ b/scripts/restore @@ -55,7 +55,7 @@ systemctl daemon-reload systemctl enable "$app".service # SETUP FAIL2BAN -ynh_add_fail2ban_config "/var/log/$app/$app.log" ".*Failed authentication attempt for .* from " 5 +ynh_add_fail2ban_config --logpath "/var/log/$app/$app.log" --failregex ".*Failed authentication attempt for .* from " --max_retry 5 #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index 9526ab1..04b45f5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -161,7 +161,7 @@ esac ynh_setup_source $final_path source/$architecture # SETUP FAIL2BAN -ynh_add_fail2ban_config "/var/log/$app/$app.log" ".*Failed authentication attempt for .* from " 5 +ynh_add_fail2ban_config --logpath "/var/log/$app/$app.log" --failregex ".*Failed authentication attempt for .* from " --max_retry 5 #================================================= # GENERIC FINALIZATION