mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-04 18:50:20 +00:00
refactor(daemon): share service description resolve
This commit is contained in:
@@ -4,6 +4,7 @@ import type { GatewayServiceRuntime } from "./service-runtime.js";
|
||||
import {
|
||||
formatGatewayServiceDescription,
|
||||
LEGACY_GATEWAY_SYSTEMD_SERVICE_NAMES,
|
||||
resolveGatewayServiceDescription,
|
||||
resolveGatewaySystemdServiceName,
|
||||
} from "./constants.js";
|
||||
import { execFileUtf8 } from "./exec-file.js";
|
||||
@@ -200,12 +201,7 @@ export async function installSystemdService({
|
||||
|
||||
const unitPath = resolveSystemdUnitPath(env);
|
||||
await fs.mkdir(path.dirname(unitPath), { 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 unit = buildSystemdUnit({
|
||||
description: serviceDescription,
|
||||
programArguments,
|
||||
|
||||
Reference in New Issue
Block a user