mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
helpers/fail2ban: grep logpath is likely to match comments in the file that contain the word logpath...
This commit is contained in:
parent
4897f72974
commit
267968074b
1 changed files with 1 additions and 1 deletions
|
@ -104,7 +104,7 @@ ignoreregex =
|
||||||
# "$logpath" using the one in the previously generated fail2ban conf file
|
# "$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
|
# 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
|
fi
|
||||||
|
|
||||||
# Create the folder and logfile if they doesn't exist,
|
# Create the folder and logfile if they doesn't exist,
|
||||||
|
|
Loading…
Add table
Reference in a new issue