MCPcopy Create free account
hub / github.com/bewcloud/bewcloud / notifyServiceManagerReady

Function notifyServiceManagerReady

main.ts:124–137  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

122}
123
124async function notifyServiceManagerReady() {
125 const socketAddress = Deno.env.get('NOTIFY_SOCKET');
126 if (typeof socketAddress !== 'string') {
127 return;
128 }
129
130 const result = await (new Deno.Command('systemd-notify', {
131 args: ['--ready', `MESSAGE=bewCloud is ready`],
132 })).output();
133 if (!result.success) {
134 const output = new TextDecoder().decode(result.stderr);
135 throw new Deno.errors.NotCapable(`Failed to execute “systemd-notify”: ${output} (code ${result.code})`);
136 }
137}
138
139export const abortController = new AbortController();
140

Callers 1

main.tsFile · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected