From 4cc300ba7fe65a15bee29f28e8a25d06d52fb1e5 Mon Sep 17 00:00:00 2001 From: Christian Date: Sat, 22 Jun 2019 23:46:17 +0200 Subject: [PATCH] fix(monitor): fix querydelay not delaying (#2406) Co-authored-by: Christian Birk --- lgsm/functions/command_monitor.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index 06786cadd..56b8ecf53 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -18,7 +18,7 @@ for queryattempt in {1..5}; do fn_print_dots "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: " fn_print_querying_eol fn_script_log_info "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt} : QUERYING" - if [ "$(cat "${rootdir}/${lockselfname}")" -lt "$(date "+%s" -d "${querydelay} mins ago")" ]; then + if [ "$(cat "${rootdir}/${lockselfname}")" -gt "$(date "+%s" -d "${querydelay} mins ago")" ]; then fn_print_ok "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: " fn_print_delay_eol fn_script_log_info "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt} : DELAY"