From 2b8ebbc86e417a8524f914abee3eae7a9e0b6945 Mon Sep 17 00:00:00 2001 From: stswangzhiping <59632378+stswangzhiping@users.noreply.github.com> Date: Thu, 30 Apr 2026 22:34:05 +0800 Subject: [PATCH] feat: run bind-quectel-serial.sh on every startup Made-with: Cursor --- bin/clawd.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bin/clawd.js b/bin/clawd.js index 6f58c41..0798ae9 100755 --- a/bin/clawd.js +++ b/bin/clawd.js @@ -4,9 +4,18 @@ // 先于其它模块:摘掉 NOTIFY_SOCKET,避免任意子进程误发 systemd notify require('../lib/systemd-env'); +const path = require('path'); +const { exec } = require('child_process'); const { ClawClient } = require('../lib/client'); const log = require('../lib/logger'); +// 每次启动绑定 Quectel 串口驱动(失败不影响主流程) +const bindScript = path.join(__dirname, '..', 'tools', 'bind-quectel-serial.sh'); +exec(`bash "${bindScript}"`, (err, stdout, stderr) => { + if (err) log.warn('clawd', `bind-quectel-serial: ${stderr || err.message}`); + else log.info('clawd', `bind-quectel-serial: ok`); +}); + const client = new ClawClient(); client.start();