diff --git a/tools/site-deploy-from-mirror.sh b/tools/site-deploy-from-mirror.sh index 53bdf5e12..1c7b0d2b1 100755 --- a/tools/site-deploy-from-mirror.sh +++ b/tools/site-deploy-from-mirror.sh @@ -21,13 +21,14 @@ MINERS_MIN_ROWS="${MINERS_MIN_ROWS:-30}" SITE="${SITE_URL:-https://igneum.network}" post_checks() { # one pass: prints the first mismatch as "field: detail" and returns 1, or returns 0 silently local j n idx m rows - j=$(curl -fsS --max-time 20 "$SITE/api/live?x=$RANDOM" 2>/dev/null) || { echo "api/live: not reachable"; return 1; } + local nc=(-H 'Cache-Control: no-cache' -H 'Pragma: no-cache') + j=$(curl -fsS "${nc[@]}" --max-time 20 "$SITE/api/live?x=$RANDOM" 2>/dev/null) || { echo "api/live: not reachable"; return 1; } n=$(printf '%s' "$j" | python3 -c 'import sys,json; print(json.load(sys.stdin)["state"]["network"])' 2>/dev/null || echo "?") [ "$n" = "$LIVE_NETWORK" ] || { echo "api/live network: $n (want $LIVE_NETWORK)"; return 1; } - idx=$(curl -fsS --max-time 20 "$SITE/?x=$RANDOM" 2>/dev/null) || { echo "index: not reachable"; return 1; } + idx=$(curl -fsS "${nc[@]}" --max-time 20 "$SITE/?x=$RANDOM" 2>/dev/null) || { echo "index: not reachable"; return 1; } for m in "${INDEX_STRINGS[@]}"; do printf '%s' "$idx" | /usr/bin/grep -qF -- "$m" || { echo "index string missing: \"$m\""; return 1; }; done - curl -fsS --max-time 20 "$SITE$LEGAL_PAGE?x=$RANDOM" 2>/dev/null | /usr/bin/grep -qiF -- "$LEGAL_STRING" || { echo "legal string missing on $LEGAL_PAGE: \"$LEGAL_STRING\""; return 1; } - rows=$(curl -fsS --max-time 20 "$SITE/miners?x=$RANDOM" 2>/dev/null | /usr/bin/grep -c '