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

Function supervisedServiceStatus

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

Source from the content-addressed store, hash-verified

90 new RegExp(`^${key}:\\s+yes(?:\\s|$)`, "im").test(stdout);
91
92export const supervisedServiceStatus = async (): Promise<SupervisedServiceStatus> => {
93 if (!executorAvailable()) return { supported: false, registered: false, running: false };
94 const dataDir = join(app.getPath("home"), ".executor");
95 const result = await runExecutor(["service", "status"], { dataDir });
96 if (result.code !== 0) {
97 serviceLog.warn(`service status failed: ${result.stderr || result.stdout}`);
98 return { supported: true, registered: false, running: false };
99 }
100 const supported = !/^Platform:\s+unsupported$/im.test(result.stdout);
101 return {
102 supported,
103 registered: supported && statusValue(result.stdout, "Registered"),
104 running: supported && statusValue(result.stdout, "Running"),
105 };
106};
107
108export const installSupervisedService = async (opts: InstallOptions): Promise<void> => {
109 if (!executorAvailable()) {

Callers 2

registerIpcHandlersFunction · 0.90

Calls 4

executorAvailableFunction · 0.85
runExecutorFunction · 0.85
statusValueFunction · 0.85
warnMethod · 0.80

Tested by

no test coverage detected