chore: rename project to clawdbot
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
import { spawnSync } from "node:child_process";
|
||||
|
||||
const DEFAULT_LAUNCHD_LABEL = "com.clawdis.mac";
|
||||
const DEFAULT_SYSTEMD_UNIT = "clawdis-gateway.service";
|
||||
const DEFAULT_LAUNCHD_LABEL = "com.clawdbot.mac";
|
||||
const DEFAULT_SYSTEMD_UNIT = "clawdbot-gateway.service";
|
||||
|
||||
export function triggerClawdisRestart():
|
||||
export function triggerClawdbotRestart():
|
||||
| "launchctl"
|
||||
| "systemd"
|
||||
| "supervisor" {
|
||||
if (process.platform !== "darwin") {
|
||||
if (process.platform === "linux") {
|
||||
const unit = process.env.CLAWDIS_SYSTEMD_UNIT || DEFAULT_SYSTEMD_UNIT;
|
||||
const unit = process.env.CLAWDBOT_SYSTEMD_UNIT || DEFAULT_SYSTEMD_UNIT;
|
||||
const userRestart = spawnSync("systemctl", ["--user", "restart", unit], {
|
||||
stdio: "ignore",
|
||||
});
|
||||
@@ -27,7 +27,7 @@ export function triggerClawdisRestart():
|
||||
return "supervisor";
|
||||
}
|
||||
|
||||
const label = process.env.CLAWDIS_LAUNCHD_LABEL || DEFAULT_LAUNCHD_LABEL;
|
||||
const label = process.env.CLAWDBOT_LAUNCHD_LABEL || DEFAULT_LAUNCHD_LABEL;
|
||||
const uid =
|
||||
typeof process.getuid === "function" ? process.getuid() : undefined;
|
||||
const target = uid !== undefined ? `gui/${uid}/${label}` : label;
|
||||
|
||||
Reference in New Issue
Block a user