Wait for VPS hub health during install

This commit is contained in:
kzolotarev95 committed 2026-06-30 11:19:58 +04:00
1 parent ef6d9e7d76
commit 806c35df36
1 file changed
+12 -6
+12 -6
View File
@@ -120,12 +120,18 @@ start_hub() {
check_hub() {
HUB_PORT80_OK=0
if curl -fsS --max-time 5 http://127.0.0.1/health >/dev/null 2>&1; then
HUB_PORT80_OK=1
fi
if curl -fsS --max-time 5 http://127.0.0.1:8088/health >/tmp/owrt-remote-health.log 2>&1; then
return 0
fi
info "Жду запуск Hub..."
i=1
while [ "$i" -le 20 ]; do
if curl -fsS --max-time 2 http://127.0.0.1:8088/health >/tmp/owrt-remote-health.log 2>&1; then
if curl -fsS --max-time 2 http://127.0.0.1/health >/dev/null 2>&1; then
HUB_PORT80_OK=1
fi
return 0
fi
sleep 1
i=$((i + 1))
done
warn "Hub не ответил на http://127.0.0.1:8088/health"
$SUDO systemctl status owrt-remote --no-pager -l || true
$SUDO journalctl -u owrt-remote -n 80 --no-pager || true