Skip to content

Commit

Permalink
helpers/fail2ban: grep logpath is likely to match comments in the fil…
Browse files Browse the repository at this point in the history
…e that contain the word logpath...
  • Loading branch information
alexAubin committed Nov 28, 2023
1 parent 4897f72 commit 2679680
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion helpers/fail2ban
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ ignoreregex =
# "$logpath" using the one in the previously generated fail2ban conf file
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")
logpath=$(grep "^logpath" "/etc/fail2ban/jail.d/$app.conf" | sed "s/ //g" | sed "s/logpath=//g")
fi

# Create the folder and logfile if they doesn't exist,
Expand Down

0 comments on commit 2679680

Please sign in to comment.