← back to Ga4 Fleet
deploy-propagated.sh: fix ssh-stdin consumption (ssh -n) + settle-and-retry verify
54f8a4fbb0520fc08ffeec5717fa179638be8a0a · 2026-08-03 13:43:47 -0700 · Steve
Files touched
Diff
commit 54f8a4fbb0520fc08ffeec5717fa179638be8a0a
Author: Steve <steve@designerwallcoverings.com>
Date: Mon Aug 3 13:43:47 2026 -0700
deploy-propagated.sh: fix ssh-stdin consumption (ssh -n) + settle-and-retry verify
---
deploy-propagated.sh | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/deploy-propagated.sh b/deploy-propagated.sh
index cff2cba..1138dd5 100755
--- a/deploy-propagated.sh
+++ b/deploy-propagated.sh
@@ -9,8 +9,15 @@ node -e 'require("./deploy-plan.json").forEach(p=>console.log([p.repo,p.base,p.p
pass=0; fail=0; failed=""
while IFS=$'\t' read -r repo base pm2 domain id; do
rsync -az --exclude node_modules --exclude .git --exclude '.env*' --exclude '*.log' --exclude .DS_Store "$repo/" "root@45.61.58.125:/root/Projects/$base/" >/dev/null 2>&1
- ssh -o ConnectTimeout=12 root@45.61.58.125 "pm2 reload $pm2 --update-env >/dev/null 2>&1" 2>/dev/null
- live=$(curl -s -m 12 "https://$domain/" | grep -oE "$id" | head -1)
+ # -n: do NOT read the loop's stdin (else ssh swallows the remaining plan lines and the loop runs once)
+ ssh -n -o ConnectTimeout=12 root@45.61.58.125 "pm2 reload $pm2 --update-env >/dev/null 2>&1" 2>/dev/null
+ # verify with a settle + one retry (a reload isn't instantly live)
+ live=""
+ for try in 1 2 3; do
+ sleep 2
+ live=$(curl -s -m 12 "https://$domain/" | grep -oE "$id" | head -1)
+ [ "$live" = "$id" ] && break
+ done
if [ "$live" = "$id" ]; then pass=$((pass+1)); printf ' ok %s\n' "$domain"; else fail=$((fail+1)); failed="$failed $domain"; printf ' FAIL %s\n' "$domain"; fi
done < /tmp/ga4_deploy.tsv
echo "=== $pass verified live · $fail failed ==="
← d451288 GA4 fleet: propagation deploy script + registry cleanup (54
·
back to Ga4 Fleet
·
GA4: celebrity.designerwallcoverings.com G-YD40CYCL31 (openc cccdf76 →