's'
This commit is contained in:
@@ -267,16 +267,18 @@ def main() -> int:
|
||||
f"echo '{PASS}' | sudo -S systemctl restart live-console.service",
|
||||
timeout=120,
|
||||
)
|
||||
_safe_print("等待服务监听…")
|
||||
time.sleep(6)
|
||||
_safe_print("等待控制面监听(最多约 45s)…")
|
||||
time.sleep(4)
|
||||
run_logged(
|
||||
client,
|
||||
log_path,
|
||||
"curl_health_after_restart",
|
||||
"curl -sS -m 15 http://127.0.0.1:8001/health 2>&1 || "
|
||||
"curl -sS -m 15 http://127.0.0.1:8101/health 2>&1 || "
|
||||
"echo 'curl_health_failed'",
|
||||
timeout=25,
|
||||
"for i in $(seq 1 22); do "
|
||||
"if curl -sf -m 4 http://127.0.0.1:8001/health >/dev/null 2>&1; then echo \"health_ok_8001\"; exit 0; fi; "
|
||||
"if curl -sf -m 4 http://127.0.0.1:8101/health >/dev/null 2>&1; then echo \"health_ok_8101\"; exit 0; fi; "
|
||||
"sleep 2; "
|
||||
"done; echo curl_health_failed; exit 0",
|
||||
timeout=120,
|
||||
)
|
||||
run_logged(
|
||||
client,
|
||||
@@ -300,18 +302,18 @@ def main() -> int:
|
||||
timeout=180,
|
||||
)
|
||||
# Caddy 刚 enable --now 时 bind :80 可能晚于立即 curl(曾出现 http_code=000)
|
||||
time.sleep(8)
|
||||
time.sleep(12)
|
||||
run_logged(
|
||||
client,
|
||||
log_path,
|
||||
"curl_port80_after_edge",
|
||||
"for i in 1 2 3 4 5; do "
|
||||
"code=$(curl -sS -m 8 -o /dev/null -w '%{http_code}' http://127.0.0.1/ 2>/dev/null || echo 000); "
|
||||
"for i in 1 2 3 4 5 6 7 8; do "
|
||||
"code=$(curl -sS -m 10 -o /dev/null -w '%{http_code}' http://127.0.0.1/ 2>/dev/null || echo 000); "
|
||||
"echo \"try$i http_code=$code\"; "
|
||||
"[ \"$code\" = 200 ] && exit 0; "
|
||||
"sleep 3; "
|
||||
"sleep 4; "
|
||||
"done; exit 1",
|
||||
timeout=60,
|
||||
timeout=120,
|
||||
)
|
||||
|
||||
run_logged(
|
||||
@@ -331,6 +333,14 @@ def main() -> int:
|
||||
timeout=20,
|
||||
)
|
||||
|
||||
run_logged(
|
||||
client,
|
||||
log_path,
|
||||
"docker_srs_neko_ps",
|
||||
"docker ps -a --format '{{.Names}} {{.Status}}' 2>/dev/null | grep -E 'live-srs|live-neko' || echo '(no live-srs / live-neko in docker ps)'",
|
||||
timeout=25,
|
||||
)
|
||||
|
||||
return 0
|
||||
finally:
|
||||
if sftp:
|
||||
|
||||
Reference in New Issue
Block a user