pp-test: preflight production check via health endpoint (no sudo needed)

This commit is contained in:
Frank
2026-08-16 05:48:17 -07:00
parent 9544c36afc
commit 1716bf37c9
+6 -3
View File
@@ -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"
}