diff --git a/scripts/reboot-recovery/full-stack-cold-start-check.sh b/scripts/reboot-recovery/full-stack-cold-start-check.sh index 86f40f7e..42aaa78d 100755 --- a/scripts/reboot-recovery/full-stack-cold-start-check.sh +++ b/scripts/reboot-recovery/full-stack-cold-start-check.sh @@ -82,8 +82,15 @@ ssh_cmd() { probe_http_code() { local url="$1" - local code - code=$(curl -s -o /dev/null -w "%{http_code}" --max-time 5 "$url" 2>/dev/null || true) + local attempt code + for attempt in 1 2; do + code=$(curl -s -o /dev/null -w "%{http_code}" --max-time 12 "$url" 2>/dev/null || true) + if [[ "$code" =~ ^[0-9]{3}$ ]] && [ "$code" != "000" ]; then + echo "$code" + return + fi + sleep 1 + done echo "${code:-000}" }