Fixes for unlogged messages + drd command

This commit is contained in:
Patrick Van der Veken 2018-05-18 11:16:20 +02:00
parent 18f69fa8ad
commit 3416d19fbc
2 changed files with 8 additions and 2 deletions

View File

@ -760,7 +760,7 @@ then
fi
# log & notify routines
if (( ARG_LOG != 0 )) && (( ALL_MSG_STC > 0 ))
if (( ARG_LOG != 0 ))
then
# log routine (combined STC=0 or <>0)
print "${HC_MSG_VAR}" | while read HC_MSG_ENTRY

View File

@ -121,7 +121,7 @@ else
fi
# check drd status
if (( $(grep -c -E -e ".*Displaying.*succeeded" ${HC_STDOUT_LOG} 2>/dev/null) > 0 ))
if (( $(grep -c -E -e ".*Information succeeded.*" ${HC_STDOUT_LOG} 2>/dev/null) > 0 ))
then
# convert NOW to epoch (pass date values as unquoted parameters)
#_NOW_EPOCH=$(data_date2epoch "$(date '+%Y')" "$(date '+%m')" "$(date '+%d')" "$(date '+%H')" "$(date '+%M')" "$(date '+%S')")
@ -242,6 +242,12 @@ then
else
_MSG="unable to run command: {${_DRD_BIN}}"
log_hc "$0" 1 "${_MSG}"
# dump debug info
(( ARG_DEBUG != 0 && ARG_DEBUG_LEVEL = 2 ))
then
log "$(<${HC_STDOUT_LOG})"
log "$(<${HC_STDERR_LOG})"
fi
return 1
fi