mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-13 02:32:56 +00:00
Node install: persist gateway token in service env (#31122)
* Node daemon: persist gateway token env * changelog: add credits for node gateway token fix * changelog: credit byungsker for node token service fix --------- Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
This commit is contained in:
@@ -279,6 +279,8 @@ export function buildNodeServiceEnvironment(params: {
|
||||
}): Record<string, string | undefined> {
|
||||
const { env } = params;
|
||||
const platform = params.platform ?? process.platform;
|
||||
const gatewayToken =
|
||||
env.OPENCLAW_GATEWAY_TOKEN?.trim() || env.CLAWDBOT_GATEWAY_TOKEN?.trim() || undefined;
|
||||
const stateDir = env.OPENCLAW_STATE_DIR;
|
||||
const configPath = env.OPENCLAW_CONFIG_PATH;
|
||||
const tmpDir = env.TMPDIR?.trim() || os.tmpdir();
|
||||
@@ -296,6 +298,7 @@ export function buildNodeServiceEnvironment(params: {
|
||||
NODE_EXTRA_CA_CERTS: nodeCaCerts,
|
||||
OPENCLAW_STATE_DIR: stateDir,
|
||||
OPENCLAW_CONFIG_PATH: configPath,
|
||||
OPENCLAW_GATEWAY_TOKEN: gatewayToken,
|
||||
OPENCLAW_LAUNCHD_LABEL: resolveNodeLaunchAgentLabel(),
|
||||
OPENCLAW_SYSTEMD_UNIT: resolveNodeSystemdServiceName(),
|
||||
OPENCLAW_WINDOWS_TASK_NAME: resolveNodeWindowsTaskName(),
|
||||
|
||||
Reference in New Issue
Block a user