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

Function writeUnit

packages/server/src/svc/systemd.ts:214–221  ·  view source on GitHub ↗
(unitPath: string, plan: InstallPlan)

Source from the content-addressed store, hash-verified

212}
213
214function writeUnit(unitPath: string, plan: InstallPlan): void {
215 const text = buildSystemdUnit({
216 description: 'Kimi Code local server (managed by `kimi server install`)',
217 programArguments: plan.programArguments,
218 });
219 mkdirSync(dirname(unitPath), { recursive: true, mode: UNIT_DIR_MODE });
220 writeFileSync(unitPath, text, { mode: UNIT_MODE });
221}
222
223function detail(res: ExecResult): string | undefined {
224 const text = (res.stderr || res.stdout).trim();

Callers 1

installFunction · 0.85

Calls 1

buildSystemdUnitFunction · 0.90

Tested by

no test coverage detected