From a1b449c9be518adf9fec968521d4844aa6cceb70 Mon Sep 17 00:00:00 2001 From: c4ch3c4d3 Date: Sat, 22 Aug 2026 19:23:51 -0600 Subject: [PATCH] fix(deploy): busybox ash lacks SECONDS; use date +%s for health deadline --- scripts/deploy.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 343ba17..0c2fadf 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -249,9 +249,10 @@ chmod 755 /etc/init.d/mk8-guard # Post-deploy verification: API must answer within ~60s (deadline-capped so # hung connections cannot stretch the window) or we roll back. -DEADLINE=\$((SECONDS + 60)) +T0=\$(date +%s) +DEADLINE=\$((\$T0 + 60)) HEALTH_OK='' -while [ \$SECONDS -lt \$DEADLINE ]; do +while [ \$(date +%s) -lt \$DEADLINE ]; do if curl -fsS -m 3 http://127.0.0.1:8080/ >/dev/null 2>&1; then HEALTH_OK=1 break