Verificacion no bloqueante: channels status con timeout 20s y deteccion de puerto sin falso negativo
This commit is contained in:
+3
-3
@@ -250,11 +250,11 @@ log "Verificando proxy..."
|
||||
curl -fsS "http://127.0.0.1:${PROXY_PORT}/health" && echo
|
||||
log "Estado del gateway..."
|
||||
systemctl --user is-active openclaw-gateway.service 2>&1
|
||||
(ss -tln 2>/dev/null || netstat -tln 2>/dev/null) | grep -q ":$GATEWAY_PORT " && echo "gateway escuchando en :$GATEWAY_PORT" || warn "no se detectó :$GATEWAY_PORT (systemctl --user status openclaw-gateway)"
|
||||
(ss -tln 2>/dev/null || netstat -tln 2>/dev/null) | grep -q ":${GATEWAY_PORT}" && echo "gateway escuchando en :${GATEWAY_PORT}" || warn "no se detectó :${GATEWAY_PORT} (mirar: systemctl --user status openclaw-gateway)"
|
||||
|
||||
if [ -n "$TELEGRAM_BOT_TOKEN" ]; then
|
||||
log "Canal Telegram configurado. Estado:"
|
||||
timeout 30 "$OPENCLAW_BIN" channels status 2>&1 | grep -iE 'telegram|channel|connected|error' | head -15 || true
|
||||
log "Canal Telegram configurado. Chequeo no bloqueante (max 20s):"
|
||||
timeout 20 "$OPENCLAW_BIN" channels status 2>&1 | grep -iE 'telegram|channel|connected|error|ready' | head -15 || warn "channels status no respondió en 20s (no bloqueante — el canal se conecta en background)"
|
||||
fi
|
||||
|
||||
echo
|
||||
|
||||
Reference in New Issue
Block a user