claw-subagent-service 0.0.35 → 0.0.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cli.js CHANGED
@@ -107,6 +107,7 @@ function installService() {
107
107
  // Linux: systemd
108
108
  const execStart = `${process.execPath} ${DAEMON_PATH}`;
109
109
  const serviceFile = `/etc/systemd/system/${SERVICE_NAME}.service`;
110
+ const pathEnv = process.env.PATH || '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin';
110
111
  const serviceContent = `[Unit]
111
112
  Description=OpenClaw Guard CLI Client
112
113
  After=network.target
@@ -117,6 +118,7 @@ ExecStart=${execStart}
117
118
  Restart=always
118
119
  RestartSec=10
119
120
  WorkingDirectory=${path.dirname(DAEMON_PATH)}
121
+ Environment="PATH=${pathEnv}"
120
122
 
121
123
  [Install]
122
124
  WantedBy=multi-user.target
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claw-subagent-service",
3
- "version": "0.0.35",
3
+ "version": "0.0.37",
4
4
  "description": "虾说静态服务",
5
5
  "main": "cli.js",
6
6
  "bin": {
@@ -103,6 +103,7 @@ if (platform === 'win32') {
103
103
  });
104
104
  } else if (platform === 'linux') {
105
105
  const serviceFile = `/etc/systemd/system/${SERVICE_NAME}.service`;
106
+ const pathEnv = process.env.PATH || '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin';
106
107
  const serviceContent = `[Unit]
107
108
  Description=Node.js 静默后台服务(开机自启/崩溃自动恢复/自动更新)
108
109
  After=network.target
@@ -114,6 +115,7 @@ Restart=always
114
115
  RestartSec=10
115
116
  WorkingDirectory=${path.dirname(DAEMON_PATH)}
116
117
  Environment="SILENT_SERVICE_DIR=${ROOT}"
118
+ Environment="PATH=${pathEnv}"
117
119
 
118
120
  [Install]
119
121
  WantedBy=multi-user.target
@@ -205,6 +205,7 @@ class ServiceManager {
205
205
  // Linux 服务安装 (systemd)
206
206
  async installLinux() {
207
207
  const serviceFile = `/etc/systemd/system/${this.serviceName}.service`;
208
+ const pathEnv = process.env.PATH || '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin';
208
209
  const serviceContent = `[Unit]
209
210
  Description=${this.serviceDesc}
210
211
  After=network.target
@@ -216,6 +217,7 @@ ExecStart=${process.execPath} ${this.scriptPath}
216
217
  Restart=always
217
218
  RestartSec=10
218
219
  Environment=NODE_ENV=production
220
+ Environment="PATH=${pathEnv}"
219
221
 
220
222
  [Install]
221
223
  WantedBy=multi-user.target