Reiniciar gateway si ya esta activo (toma config nueva al re-correr)

This commit is contained in:
renato97
2026-08-03 22:27:58 -03:00
parent 7ee42d231f
commit 344e49d4cc
+11 -5
View File
@@ -186,11 +186,17 @@ mkdir -p "$XDG_RUNTIME_DIR" 2>/dev/null || true
log "Instalando daemon del gateway (systemd usuario)..."
"$OPENCLAW_BIN" daemon install --runtime node >/dev/null 2>&1 || warn "daemon install avisó algo; se intenta igual"
systemctl --user daemon-reload 2>/dev/null || true
systemctl --user enable --now openclaw-gateway.service >/dev/null 2>&1 || {
warn "El servicio openclaw-gateway no arrancó al vuelo; reintentando..."
sleep 2
systemctl --user start openclaw-gateway.service >/dev/null 2>&1 || true
}
systemctl --user enable openclaw-gateway.service >/dev/null 2>&1 || true
if systemctl --user is-active --quiet openclaw-gateway.service 2>/dev/null; then
log "Reiniciando gateway para tomar la config nueva..."
systemctl --user restart openclaw-gateway.service >/dev/null 2>&1 || true
else
systemctl --user start openclaw-gateway.service >/dev/null 2>&1 || {
warn "El servicio openclaw-gateway no arrancó al vuelo; reintentando..."
sleep 2
systemctl --user start openclaw-gateway.service >/dev/null 2>&1 || true
}
fi
sleep 4
# ---------------- 5) Verificación ----------------