From a6238199393e4d5196d34f5c45166716241a22cf Mon Sep 17 00:00:00 2001 From: Dominik Dzienia Date: Mon, 9 Mar 2026 17:36:38 +0100 Subject: [PATCH] Fix watchdog_run to use base 16 arithmetic for host hash calculation --- src/logic_watchdog.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"