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