(opts: InstallOptions)
| 106 | }; |
| 107 | |
| 108 | export const installSupervisedService = async (opts: InstallOptions): Promise<void> => { |
| 109 | if (!executorAvailable()) { |
| 110 | throw new Error("Bundled executor binary is not available."); |
| 111 | } |
| 112 | const result = await runExecutor(["install", "--port", String(opts.port)], { |
| 113 | dataDir: opts.dataDir, |
| 114 | }); |
| 115 | if (result.code !== 0) { |
| 116 | throw new Error((result.stderr || result.stdout).trim() || "`executor install` failed."); |
| 117 | } |
| 118 | serviceLog.info(`installed supervised service via bundled executor on port ${opts.port}`); |
| 119 | }; |
| 120 | |
| 121 | export const uninstallSupervisedService = async (dataDir: string): Promise<void> => { |
| 122 | if (!executorAvailable()) return; |
no test coverage detected