()
| 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(); |
nothing calls this directly
no test coverage detected