(opts: InstallOptions)
| 124 | }; |
| 125 | |
| 126 | export const installSupervisedService = async (opts: InstallOptions): Promise<void> => { |
| 127 | if (!executorAvailable()) { |
| 128 | throw new Error("Bundled executor binary is not available."); |
| 129 | } |
| 130 | const result = await runExecutor(["install", "--port", String(opts.port)], { |
| 131 | dataDir: opts.dataDir, |
| 132 | }); |
| 133 | if (result.code !== 0) { |
| 134 | throw new Error((result.stderr || result.stdout).trim() || "`executor install` failed."); |
| 135 | } |
| 136 | serviceLog.info(`installed supervised service via bundled executor on port ${opts.port}`); |
| 137 | }; |
| 138 | |
| 139 | export const uninstallSupervisedService = async (dataDir: string): Promise<void> => { |
| 140 | if (!executorAvailable()) return; |
no test coverage detected