feat(openclaw): persist config as ~/.openclaw/openclaw.json

- Read gateway token/port via JSON.parse (same structure as former YAML)
- Update claw.cutos.ai origin by replacing URLs in JSON string fields
- Export resolveOpenclawConfigFile() for frpc + client
- Drop js-yaml dependency
- install: ExecStartPre touches openvfd only if nodes exist (3528-friendly)
- Add tools/deploy-rsync.sh for syncing /opt/clawd over SSH

Made-with: Cursor
This commit is contained in:
stswangzhiping
2026-03-27 13:49:23 +08:00
parent 85026cdf47
commit 884b0dc50a
7 changed files with 111 additions and 46 deletions

View File

@@ -35,7 +35,7 @@ Claw Box 守护进程,将本地 Linux 设备通过 WebSocket 长连接接入 [
| 7 | `lib/metrics.js` | 系统指标采集systeminformation |
| 8 | `lib/frpc.js` | 下载 frpc、写 `frpc.toml`、HTTP 子域转发 dashboard、TCP 转发 ttydWatchdog |
| 9 | `lib/frpc.js`ttyd | 本机 Web 终端(`CLAWD_TTY_USER`,默认 `sts`),供 frp 反代 |
| 10 | OpenClaw 联动 | 激活后更新 `~/.openclaw/config/config.yaml` 中 gateway origin可选重启 gateway |
| 10 | OpenClaw 联动 | 激活后更新 `~/.openclaw/openclaw.json` 中 gateway origin(字符串字段内 URL,可选重启 gateway |
| 11 | `lib/provisioning.js` | AP 配网:等待 NM 重连、有线先连云端再后台开 AP、WiFi 断再开 AP |
| 12 | `lib/network.js` | `nmcli`联网检测、WiFi 扫描/连接、开/关热点 |
| 13 | `lib/dns-hijack.js` | Captive PortalNM `dnsmasq-shared.d`install 预写) |