@ddtcorex/dsh-maestro-supervisor 0.7.3 → 0.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -112,8 +112,8 @@ for command in ss ps grep sort; do
|
|
|
112
112
|
command -v "$command" >/dev/null 2>&1 || fail "required command is unavailable: $command"
|
|
113
113
|
done
|
|
114
114
|
|
|
115
|
-
listener_pids="$({ ss -tlnp 2>/dev/null || true; } | grep -E ':(3000|3080)([[:space:]]|$)' | grep -oE 'pid=[0-9]+' | cut -d= -f2 | sort -u || true)"
|
|
116
|
-
[[ -n "$listener_pids" ]] || fail 'no listeners found on ports 3000 or
|
|
115
|
+
listener_pids="$({ ss -tlnp 2>/dev/null || true; } | grep -E ':(3000|3080|3081|3082)([[:space:]]|$)' | grep -oE 'pid=[0-9]+' | cut -d= -f2 | sort -u || true)"
|
|
116
|
+
[[ -n "$listener_pids" ]] || fail 'no listeners found on ports 3000/3080 (proxy) or 3081/3082 (local-pin-gate topology)'
|
|
117
117
|
|
|
118
118
|
resolve_tree() {
|
|
119
119
|
local current="$1"
|
|
@@ -250,7 +250,7 @@ else
|
|
|
250
250
|
fi
|
|
251
251
|
fi
|
|
252
252
|
|
|
253
|
-
for port in 3000 3080; do
|
|
253
|
+
for port in 3000 3080 3081 3082; do
|
|
254
254
|
if ss -tln 2>/dev/null | grep -q ":$port "; then
|
|
255
255
|
fail "port $port remains held; refusing to double-boot"
|
|
256
256
|
fi
|
|
@@ -287,12 +287,20 @@ fi
|
|
|
287
287
|
for _ in $(seq 1 90); do
|
|
288
288
|
# 401 is healthy: dsh-web is up but requires the browser token (matches
|
|
289
289
|
# dsh-web-supervisor's own health-poller convention since DSH 0.1.2).
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
290
|
+
# Under the local-pin-gate topology (2026-09-02) :3080 is the maestro PIN
|
|
291
|
+
# proxy (303 -> login / 200 authed) and the raw webserver lives on :3082 —
|
|
292
|
+
# accept any dsh-web surface that answers 200/401/303.
|
|
293
|
+
code_3080="$(curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1:3080/ || true)"
|
|
294
|
+
if [[ "$code_3080" == 200 || "$code_3080" == 401 || "$code_3080" == 303 ]]; then
|
|
295
|
+
printf '[restart] DSH Web is serving HTTP %s on port 3080\n' "$code_3080"
|
|
296
|
+
exit 0
|
|
297
|
+
fi
|
|
298
|
+
code_3082="$(curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1:3082/ || true)"
|
|
299
|
+
if [[ "$code_3082" == 200 || "$code_3082" == 401 ]]; then
|
|
300
|
+
printf '[restart] DSH Web raw webserver is serving HTTP %s on port 3082\n' "$code_3082"
|
|
293
301
|
exit 0
|
|
294
302
|
fi
|
|
295
303
|
sleep 1
|
|
296
304
|
done
|
|
297
305
|
|
|
298
|
-
fail 'DSH Web did not serve HTTP 200/401 on
|
|
306
|
+
fail 'DSH Web did not serve HTTP 200/401/303 on :3080 (PIN proxy) or :3082 (raw webserver) before timeout'
|