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