mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 16:44:33 +00:00
refactor: rename to openclaw
This commit is contained in:
@@ -87,7 +87,7 @@ function normalizeSystemdUnit(raw?: string, profile?: string): string {
|
||||
return unit.endsWith(".service") ? unit : `${unit}.service`;
|
||||
}
|
||||
|
||||
export function triggerMoltbotRestart(): RestartAttempt {
|
||||
export function triggerOpenClawRestart(): RestartAttempt {
|
||||
if (process.env.VITEST || process.env.NODE_ENV === "test") {
|
||||
return { ok: true, method: "supervisor", detail: "test mode" };
|
||||
}
|
||||
@@ -95,8 +95,8 @@ export function triggerMoltbotRestart(): RestartAttempt {
|
||||
if (process.platform !== "darwin") {
|
||||
if (process.platform === "linux") {
|
||||
const unit = normalizeSystemdUnit(
|
||||
process.env.CLAWDBOT_SYSTEMD_UNIT,
|
||||
process.env.CLAWDBOT_PROFILE,
|
||||
process.env.OPENCLAW_SYSTEMD_UNIT,
|
||||
process.env.OPENCLAW_PROFILE,
|
||||
);
|
||||
const userArgs = ["--user", "restart", unit];
|
||||
tried.push(`systemctl ${userArgs.join(" ")}`);
|
||||
@@ -130,8 +130,8 @@ export function triggerMoltbotRestart(): RestartAttempt {
|
||||
}
|
||||
|
||||
const label =
|
||||
process.env.CLAWDBOT_LAUNCHD_LABEL ||
|
||||
resolveGatewayLaunchAgentLabel(process.env.CLAWDBOT_PROFILE);
|
||||
process.env.OPENCLAW_LAUNCHD_LABEL ||
|
||||
resolveGatewayLaunchAgentLabel(process.env.OPENCLAW_PROFILE);
|
||||
const uid = typeof process.getuid === "function" ? process.getuid() : undefined;
|
||||
const target = uid !== undefined ? `gui/${uid}/${label}` : label;
|
||||
const args = ["kickstart", "-k", target];
|
||||
|
||||
Reference in New Issue
Block a user