Skip to content

Commit

Permalink
fix runserver check
Browse files Browse the repository at this point in the history
  • Loading branch information
Hahn Axel (hahn) committed Jan 14, 2022
1 parent 7f0d87b commit b4ea06e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cronwrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
# 2017-10-13 [email protected] 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
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit b4ea06e

Please sign in to comment.