mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 02:50:20 +00:00
refactor(daemon): share service description resolve
This commit is contained in:
@@ -2,8 +2,8 @@ import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import type { GatewayServiceRuntime } from "./service-runtime.js";
|
||||
import {
|
||||
formatGatewayServiceDescription,
|
||||
GATEWAY_LAUNCH_AGENT_LABEL,
|
||||
resolveGatewayServiceDescription,
|
||||
resolveGatewayLaunchAgentLabel,
|
||||
resolveLegacyGatewayLaunchAgentLabels,
|
||||
} from "./constants.js";
|
||||
@@ -384,12 +384,7 @@ export async function installLaunchAgent({
|
||||
const plistPath = resolveLaunchAgentPlistPathForLabel(env, label);
|
||||
await fs.mkdir(path.dirname(plistPath), { recursive: true });
|
||||
|
||||
const serviceDescription =
|
||||
description ??
|
||||
formatGatewayServiceDescription({
|
||||
profile: env.OPENCLAW_PROFILE,
|
||||
version: environment?.OPENCLAW_SERVICE_VERSION ?? env.OPENCLAW_SERVICE_VERSION,
|
||||
});
|
||||
const serviceDescription = resolveGatewayServiceDescription({ env, environment, description });
|
||||
const plist = buildLaunchAgentPlist({
|
||||
label,
|
||||
comment: serviceDescription,
|
||||
|
||||
Reference in New Issue
Block a user