MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / restart

Function restart

packages/server/src/svc/launchd.ts:170–180  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

168 }
169
170 async function restart(): Promise<LifecycleResult> {
171 const target = `${deps.guiDomain()}/${KIMI_SERVER_LABEL}`;
172 const result = await deps.execLaunchctl(['kickstart', '-k', target]);
173 if (result.code !== 0) {
174 return {
175 ok: false,
176 message: `launchctl kickstart -k failed: ${detail(result) ?? 'unknown error'}`,
177 };
178 }
179 return { ok: true, message: `Kimi server restarted (${KIMI_SERVER_LABEL}).` };
180 }
181
182 async function status(): Promise<ServiceStatus> {
183 const plistPath = deps.plistPath();

Callers

nothing calls this directly

Calls 3

guiDomainMethod · 0.80
execLaunchctlMethod · 0.80
detailFunction · 0.70

Tested by

no test coverage detected