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

Function restart

packages/server/src/svc/systemd.ts:144–153  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

142 }
143
144 async function restart(): Promise<LifecycleResult> {
145 const result = await deps.execSystemctl(['restart', KIMI_SERVER_SYSTEMD_UNIT]);
146 if (result.code !== 0) {
147 return {
148 ok: false,
149 message: `systemctl --user restart failed: ${detail(result) ?? 'unknown error'}`,
150 };
151 }
152 return { ok: true, message: `Kimi server restarted (${KIMI_SERVER_SYSTEMD_UNIT}).` };
153 }
154
155 async function status(): Promise<ServiceStatus> {
156 const unitPath = deps.unitPath();

Callers

nothing calls this directly

Calls 2

execSystemctlMethod · 0.80
detailFunction · 0.70

Tested by

no test coverage detected