Don't process empty log lines - fixes a bug that manifests itself with proftpd wherein every log line is followed by an empty one.

This commit is contained in:
Darren 'Tadgy' Austin 2018-05-13 20:56:12 +01:00
commit c0dd3d4d8e

View file

@ -369,6 +369,9 @@ while :; do
# If the 'read' timed out and the exapnded template is the same as the old expanded template, there is no need to do anything.
(( LJ_TIMED_OUT == 1 )) && [[ "$LJ_EXPANDED_TEMPLATE" == "$LJ_OLD_TEMPLATE" ]] && continue
# If the 'read' did not time out but the line read is empty, don't do anything.
(( LJ_TIMED_OUT != 1 )) && [[ "$LJ_LOG_DATA" =~ ^[[:space:]]*$ ]] && continue
# Make sure the base directory still exists - it could have disappeared while we were blocked in 'read'.
# Note: We won't make this directory ourselves - as it's the base directory it should exist on the system to start with.
[[ ! -e "$LJ_BASEDIR" ]] && {