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

@@ -187,7 +187,8 @@ Wants=NetworkManager.service
[Service]
Type=simple
EnvironmentFile=$ENV_FILE
ExecStartPre=/bin/sh -c 'echo 1 > /sys/devices/platform/openvfd/attr/b1 2>/dev/null; echo 1 > /sys/devices/platform/openvfd/attr/b2 2>/dev/null; true'
# 部分机型无 openvfd 或路径不同不存在则跳过3528 等新板可忽略)
ExecStartPre=/bin/sh -c 'for p in /sys/devices/platform/openvfd/attr/b1 /sys/devices/platform/openvfd/attr/b2; do [ -e "$p" ] && echo 1 >"$p" 2>/dev/null || true; done'
ExecStart=$NODE_BIN $INSTALL_DIR/bin/clawd.js
WorkingDirectory=$INSTALL_DIR