From b4ea06e591d412b83bb08ef99068a6a495bef28e Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" Date: Fri, 14 Jan 2022 14:17:45 +0100 Subject: [PATCH] fix runserver check --- cronwrapper.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cronwrapper.sh b/cronwrapper.sh index 4f23cad..7c39380 100755 --- a/cronwrapper.sh +++ b/cronwrapper.sh @@ -36,6 +36,7 @@ # 2017-10-13 axel.hahn@iml.unibe.ch use eval to execute multiple commands # 2021-02-23 ahahn add help and parameter detection # 2022-01-12 ahahn fixes based on shellcheck +# 2022-01-14 ahahn fix runserver check # ------------------------------------------------------------ # show help @@ -199,7 +200,7 @@ if ls "${lastfile}" >/dev/null 2>&1; then w "REM INFO: expires $expdate - $(date -d @$expdate)" typeset -i timeleft=$expdate-$iStart w "REM INFO: job is locked for other servers for $timeleft more seconds" - if ! hostname | grep -F "$runserver" >/dev/null; then + if ! echo "${MYHOST}" | grep -F "$runserver" >/dev/null; then w "REM INFO: it locked up to $expdate by $runserver" if [ $timeleft -gt 0 ]; then w REM STOP: job is locked.