@yeaft/webchat-agent 0.0.56 → 0.0.57
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/connection.js +7 -0
- package/package.json +1 -1
- package/service.js +1 -0
package/connection.js
CHANGED
|
@@ -475,6 +475,13 @@ async function handleMessage(msg) {
|
|
|
475
475
|
'#!/bin/bash',
|
|
476
476
|
`PID=${pid}`,
|
|
477
477
|
`PKG="${pkgName}@latest"`,
|
|
478
|
+
`LOGFILE="${join(configDir, 'logs', 'upgrade.log')}"`,
|
|
479
|
+
`export PATH="${process.env.PATH}"`,
|
|
480
|
+
'',
|
|
481
|
+
'# Redirect all output to log file',
|
|
482
|
+
'exec > "$LOGFILE" 2>&1',
|
|
483
|
+
'echo "[Upgrade] Started at $(date)"',
|
|
484
|
+
'',
|
|
478
485
|
...(cwd ? [`INSTALL_DIR="${cwd}"`] : []),
|
|
479
486
|
'',
|
|
480
487
|
'# Wait for current process to exit',
|
package/package.json
CHANGED
package/service.js
CHANGED
|
@@ -164,6 +164,7 @@ ExecStart=${nodePath} ${cliPath}
|
|
|
164
164
|
WorkingDirectory=${config.workDir || homedir()}
|
|
165
165
|
Restart=on-failure
|
|
166
166
|
RestartSec=10
|
|
167
|
+
KillMode=process
|
|
167
168
|
${envLines.join('\n')}
|
|
168
169
|
Environment=PATH=${nodeBinDir}:${homedir()}/.local/bin:${homedir()}/.npm-global/bin:/usr/local/bin:/usr/bin:/bin
|
|
169
170
|
|