Wait for VPS hub health during install
This commit is contained in:
1 parent
ef6d9e7d76
commit
806c35df36
1 file changed
+12
-6
+12
-6
@@ -120,12 +120,18 @@ start_hub() {
|
|||||||
|
|
||||||
check_hub() {
|
check_hub() {
|
||||||
HUB_PORT80_OK=0
|
HUB_PORT80_OK=0
|
||||||
if curl -fsS --max-time 5 http://127.0.0.1/health >/dev/null 2>&1; then
|
info "Жду запуск Hub..."
|
||||||
HUB_PORT80_OK=1
|
i=1
|
||||||
fi
|
while [ "$i" -le 20 ]; do
|
||||||
if curl -fsS --max-time 5 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:8088/health >/tmp/owrt-remote-health.log 2>&1; then
|
||||||
return 0
|
if curl -fsS --max-time 2 http://127.0.0.1/health >/dev/null 2>&1; then
|
||||||
fi
|
HUB_PORT80_OK=1
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
sleep 1
|
||||||
|
i=$((i + 1))
|
||||||
|
done
|
||||||
warn "Hub не ответил на http://127.0.0.1:8088/health"
|
warn "Hub не ответил на http://127.0.0.1:8088/health"
|
||||||
$SUDO systemctl status owrt-remote --no-pager -l || true
|
$SUDO systemctl status owrt-remote --no-pager -l || true
|
||||||
$SUDO journalctl -u owrt-remote -n 80 --no-pager || true
|
$SUDO journalctl -u owrt-remote -n 80 --no-pager || true
|
||||||
|
|||||||
Reference in new issue
Block a user