Update helpers/fail2ban

This commit is contained in:
Alexandre Aubin 2023-11-27 14:06:13 +01:00 committed by GitHub
parent 27c933ee6d
commit 15798b4937
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -102,7 +102,7 @@ ignoreregex =
# if "$logpath" doesn't exist (as if using --use_template argument), assign
# "$logpath" using the one in the previously generated fail2ban conf file
if [ -z "$logpath" ]; then
if [ -z "${logpath:-}" ]; then
# the first sed deletes possibles spaces and the second one extract the path
logpath=$(grep logpath "/etc/fail2ban/jail.d/$app.conf" | sed "s/ //g" | sed "s/logpath=//g")
fi