mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 00:41:25 +00:00
feat: add exec host routing + node daemon
This commit is contained in:
@@ -6,6 +6,12 @@ import {
|
||||
GATEWAY_SERVICE_MARKER,
|
||||
resolveGatewayLaunchAgentLabel,
|
||||
resolveGatewaySystemdServiceName,
|
||||
NODE_SERVICE_KIND,
|
||||
NODE_SERVICE_MARKER,
|
||||
NODE_WINDOWS_TASK_SCRIPT_NAME,
|
||||
resolveNodeLaunchAgentLabel,
|
||||
resolveNodeSystemdServiceName,
|
||||
resolveNodeWindowsTaskName,
|
||||
} from "./constants.js";
|
||||
|
||||
export type MinimalServicePathOptions = {
|
||||
@@ -82,3 +88,22 @@ export function buildServiceEnvironment(params: {
|
||||
CLAWDBOT_SERVICE_VERSION: VERSION,
|
||||
};
|
||||
}
|
||||
|
||||
export function buildNodeServiceEnvironment(params: {
|
||||
env: Record<string, string | undefined>;
|
||||
}): Record<string, string | undefined> {
|
||||
const { env } = params;
|
||||
return {
|
||||
PATH: buildMinimalServicePath({ env }),
|
||||
CLAWDBOT_STATE_DIR: env.CLAWDBOT_STATE_DIR,
|
||||
CLAWDBOT_CONFIG_PATH: env.CLAWDBOT_CONFIG_PATH,
|
||||
CLAWDBOT_LAUNCHD_LABEL: resolveNodeLaunchAgentLabel(),
|
||||
CLAWDBOT_SYSTEMD_UNIT: resolveNodeSystemdServiceName(),
|
||||
CLAWDBOT_WINDOWS_TASK_NAME: resolveNodeWindowsTaskName(),
|
||||
CLAWDBOT_TASK_SCRIPT_NAME: NODE_WINDOWS_TASK_SCRIPT_NAME,
|
||||
CLAWDBOT_LOG_PREFIX: "node",
|
||||
CLAWDBOT_SERVICE_MARKER: NODE_SERVICE_MARKER,
|
||||
CLAWDBOT_SERVICE_KIND: NODE_SERVICE_KIND,
|
||||
CLAWDBOT_SERVICE_VERSION: VERSION,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user