MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / restartSupervisedService

Function restartSupervisedService

apps/desktop/src/main/service.ts:150–161  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

148};
149
150export const restartSupervisedService = async (): Promise<void> => {
151 if (!executorAvailable()) {
152 throw new Error("Bundled executor binary is not available.");
153 }
154 const dataDir = join(app.getPath("home"), ".executor");
155 const result = await runExecutor(["service", "restart"], { dataDir });
156 if (result.code !== 0) {
157 throw new Error(
158 (result.stderr || result.stdout).trim() || "`executor service restart` failed.",
159 );
160 }
161};

Callers 2

registerIpcHandlersFunction · 0.90

Calls 2

executorAvailableFunction · 0.85
runExecutorFunction · 0.85

Tested by

no test coverage detected