From 1716bf37c945a132b99b501153a8b2bc1f018c64 Mon Sep 17 00:00:00 2001 From: Frank Date: Sun, 16 Aug 2026 05:48:17 -0700 Subject: [PATCH] pp-test: preflight production check via health endpoint (no sudo needed) --- scripts/pp-test.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/pp-test.sh b/scripts/pp-test.sh index 5c87889..a7a12fd 100755 --- a/scripts/pp-test.sh +++ b/scripts/pp-test.sh @@ -68,9 +68,12 @@ do_preflight() { rtt=$(ssh_claw "ping -c 5 -W 2 192.168.0.235 | tail -1" | grep -oE '[0-9.]+/[0-9.]+ ms' | head -1 || true) log " rtt: ${rtt:-unknown}" - log "preflight: production services" - ssh_claw "$SUDO systemctl is-active frank-default-large" 2>/dev/null || true - ssh_server "$SUDO systemctl is-active frank-default-small" 2>/dev/null || true + log "preflight: production services (health endpoint = no sudo needed)" + local h1 h2 + h1=$(ssh_claw "curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1:7770/health 2>/dev/null || true") + h2=$(ssh_server "curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1:7770/health 2>/dev/null || true") + log " frank-default-large: ${h1:-no-response}" + log " frank-default-small: ${h2:-no-response}" log "preflight OK" }