diff --git a/helpers/fail2ban b/helpers/fail2ban index 4d587163b..2911d43d7 100644 --- a/helpers/fail2ban +++ b/helpers/fail2ban @@ -104,14 +104,7 @@ ignoreregex = # "$logpath" using the one in the package's conf/f2b_jail.conf template if [ -z "$logpath" ]; then # the first sed deletes possibles spaces and the second one extract the path - logpath=$(grep logpath "$YNH_APP_BASEDIR/conf/f2b_jail.conf" | sed "s/ //g" | sed "s/logpath=//g") - # replace any '__VAR__' by their real variable using ynh_replace_vars - # in some hacky way because ynh_replace_vars supports only files ^^' - tempdir="$(mktemp -d)" - echo "$logpath" > "$tempdir/process-logpath" - ynh_replace_vars --file="$tempdir/process-logpath" - logpath="$(cat "$tempdir/process-logpath")" - rm -r "$tempdir" + 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,