diff --git a/src/logic_watchdog.sh b/src/logic_watchdog.sh index 4e74be7..c54b2b1 100644 --- a/src/logic_watchdog.sh +++ b/src/logic_watchdog.sh @@ -162,7 +162,7 @@ get_watchdog_status() { watchdog_run() { local host_hash - host_hash=$(printf '%s' "$(hostname)" | md5sum | awk '{print $1}' | cut -c1-8 | xargs printf '%d' 16 16) + host_hash=$(( 16#$(printf '%s' "$(hostname)" | md5sum | awk '{print $1}' | cut -c1-8) )) local offset=$(( host_hash % 300 )) echo "Watchdog delay: sleeping ${offset}s (host-based offset)" sleep "$offset"