Telegram por defecto (bot rvfinanzas, owner 692714536): 1 click real, sin vars de entorno

This commit is contained in:
renato97
2026-08-03 22:42:31 -03:00
parent 447d35a237
commit d77556d3a3
2 changed files with 12 additions and 10 deletions
+8 -4
View File
@@ -11,6 +11,7 @@ Instala y deja corriendo, sin pedir nada:
| `openclaw` CLI + Gateway | daemon systemd de usuario (`openclaw-gateway.service`) |
| `free-ide-proxy` | endpoint OpenAI/Anthropic local `127.0.0.1:6446` (binario precompilado o build desde fuente) |
| Config pre-cargada | `~/.openclaw/openclaw.json` apuntando a `free-ide/<modelo>` |
| Canal Telegram | bot @rvfinanzas_bot, DM con `dmPolicy=allowlist` (owner `692714536`) |
## Instalación (1 click)
@@ -37,17 +38,20 @@ PROXY_API_KEY=mi-secreto curl -fsSL ... | bash
| `PROXY_API_KEY` | embebida (solo local) | clave que protege el proxy |
| `GATEWAY_PORT` | `18789` | puerto del gateway de OpenClaw |
| `GITEA_URL` / `GITEA_USER` | `https://gitea.cbcren.online` / `renato97` | de dónde baja el proxy |
| `TELEGRAM_BOT_TOKEN` | @rvfinanzas_bot | token del bot; vaciarlo deshabilita Telegram |
| `TELEGRAM_USER_ID` | `692714536` | dueño del canal (DM allowlist) |
## Qué hace el script
1. Instala `openclaw` (npm si hay Node ≥22, si no el installer oficial que provee Node).
2. Instala `free-ide-proxy` (binario `linux-amd64` del release, o compila con Go en otras arquitecturas).
3. Escribe `~/.openclaw/openclaw.json` ya configurado (provider `free-ide``127.0.0.1:6446/v1`).
4. Activa `loginctl enable-linger` y arranca ambos servicios de systemd de usuario.
5. Verifica `/health` del proxy y hace una inferencia de prueba con el agente.
3. Escribe `~/.openclaw/openclaw.json` ya configurado (provider `free-ide``127.0.0.1:6446/v1`) usando **node** (merge seguro: no corrompe JSON, hace backup y se auto-repara desde `.last-good` si la config previa está dañada).
4. Configura el canal **Telegram** (`channels.telegram` allowlist + `commands.ownerAllowFrom`) y detiene cualquier servicio viejo que use el mismo bot.
5. Activa `loginctl enable-linger` y arranca ambos servicios de systemd de usuario.
6. Verifica `/health` del proxy, el estado del gateway y el canal Telegram.
Es **idempotente**: si ya hay un proxy en `:6446` o una config existente, los respeta
(hace backup de la config y reutiliza el token del gateway).
(hace backup de la config y reutiliza el token del gateway). Re-corrélo las veces que quieras.
## Uso
+4 -6
View File
@@ -13,13 +13,11 @@
# Uso (Linux/macOS):
# curl -fsSL https://gitea.cbcren.online/renato97/openclaw-allinone/raw/branch/main/install.sh | bash
#
# Con Telegram:
# curl -fsSL https://gitea.cbcren.online/renato97/openclaw-allinone/raw/branch/main/install.sh | \
# TELEGRAM_BOT_TOKEN=123:abc TELEGRAM_USER_ID=123456789 bash
#
# Variables (override):
# MODEL, PROXY_API_KEY, GATEWAY_PORT, PROXY_PORT, GITEA_URL, GITEA_USER,
# PROXY_REPO, PROXY_VERSION, TELEGRAM_BOT_TOKEN, TELEGRAM_USER_ID
# Telegram viene configurado por defecto (@rvfinanzas_bot, owner 692714536).
# Para correr sin Telegram: TELEGRAM_BOT_TOKEN= TELEGRAM_USER_ID= bash install.sh
# =============================================================================
set -euo pipefail
@@ -37,8 +35,8 @@ GITEA_USER="${GITEA_USER:-renato97}"
PROXY_REPO="${PROXY_REPO:-free-ide-proxy}"
PROXY_VERSION="${PROXY_VERSION:-v1.0.0}"
OPENCLAW_VER="${OPENCLAW_VER:-2026.7.1-2}"
TELEGRAM_BOT_TOKEN="${TELEGRAM_BOT_TOKEN:-}"
TELEGRAM_USER_ID="${TELEGRAM_USER_ID:-}"
TELEGRAM_BOT_TOKEN="${TELEGRAM_BOT_TOKEN-8501699617:AAHe5T8ZfLobkYO5TfCbNPPXUX8LN9tjD8g}"
TELEGRAM_USER_ID="${TELEGRAM_USER_ID-692714536}"
GITEA_URL="${GITEA_URL%/}"
export PATH="$HOME/.local/bin:$HOME/.openclaw/bin:/usr/local/bin:$PATH"