mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 02:00:26 +00:00
refactor: rename to openclaw
This commit is contained in:
@@ -39,11 +39,11 @@ function resolveSystemdUnitPathForName(
|
||||
}
|
||||
|
||||
function resolveSystemdServiceName(env: Record<string, string | undefined>): string {
|
||||
const override = env.CLAWDBOT_SYSTEMD_UNIT?.trim();
|
||||
const override = env.OPENCLAW_SYSTEMD_UNIT?.trim();
|
||||
if (override) {
|
||||
return override.endsWith(".service") ? override.slice(0, -".service".length) : override;
|
||||
}
|
||||
return resolveGatewaySystemdServiceName(env.CLAWDBOT_PROFILE);
|
||||
return resolveGatewaySystemdServiceName(env.OPENCLAW_PROFILE);
|
||||
}
|
||||
|
||||
function resolveSystemdUnitPath(env: Record<string, string | undefined>): string {
|
||||
@@ -202,8 +202,8 @@ export async function installSystemdService({
|
||||
const serviceDescription =
|
||||
description ??
|
||||
formatGatewayServiceDescription({
|
||||
profile: env.CLAWDBOT_PROFILE,
|
||||
version: environment?.CLAWDBOT_SERVICE_VERSION ?? env.CLAWDBOT_SERVICE_VERSION,
|
||||
profile: env.OPENCLAW_PROFILE,
|
||||
version: environment?.OPENCLAW_SERVICE_VERSION ?? env.OPENCLAW_SERVICE_VERSION,
|
||||
});
|
||||
const unit = buildSystemdUnit({
|
||||
description: serviceDescription,
|
||||
@@ -213,7 +213,7 @@ export async function installSystemdService({
|
||||
});
|
||||
await fs.writeFile(unitPath, unit, "utf8");
|
||||
|
||||
const serviceName = resolveGatewaySystemdServiceName(env.CLAWDBOT_PROFILE);
|
||||
const serviceName = resolveGatewaySystemdServiceName(env.OPENCLAW_PROFILE);
|
||||
const unitName = `${serviceName}.service`;
|
||||
const reload = await execSystemctl(["--user", "daemon-reload"]);
|
||||
if (reload.code !== 0) {
|
||||
@@ -244,7 +244,7 @@ export async function uninstallSystemdService({
|
||||
stdout: NodeJS.WritableStream;
|
||||
}): Promise<void> {
|
||||
await assertSystemdAvailable();
|
||||
const serviceName = resolveGatewaySystemdServiceName(env.CLAWDBOT_PROFILE);
|
||||
const serviceName = resolveGatewaySystemdServiceName(env.OPENCLAW_PROFILE);
|
||||
const unitName = `${serviceName}.service`;
|
||||
await execSystemctl(["--user", "disable", "--now", unitName]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user