@astrofoundry/pi-astro 0.33.1 → 0.33.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -101,9 +101,13 @@ export const ACTIVITY_COMMAND: Record<Exclude<Service, "bridge">, Command> = {
|
|
|
101
101
|
astrogate: { file: "/opt/homebrew/bin/astrogate", args: ["status"] },
|
|
102
102
|
};
|
|
103
103
|
|
|
104
|
-
/**
|
|
104
|
+
/**
|
|
105
|
+
* The restart for each service; the bridge's own runs detached because it ends this process.
|
|
106
|
+
* herdr's Homebrew formula dropped its service block in 0.9.x, so its server runs from our own
|
|
107
|
+
* LaunchAgent `com.astrofoundry.herdr`; `brew services restart herdr` would unload it for good.
|
|
108
|
+
*/
|
|
105
109
|
export function restartCommand(service: Service, uid: number): Command {
|
|
106
|
-
if (service === "herdr") return { file: "/
|
|
110
|
+
if (service === "herdr") return { file: "/bin/launchctl", args: ["kickstart", "-k", `gui/${uid}/com.astrofoundry.herdr`] };
|
|
107
111
|
if (service === "astrogate") return { file: "/bin/launchctl", args: ["kickstart", "-k", `gui/${uid}/com.monadeo.astrogate`] };
|
|
108
112
|
return { file: "/bin/launchctl", args: ["kickstart", "-k", `gui/${uid}/com.astrofoundry.astro-discord`] };
|
|
109
113
|
}
|
|
@@ -337,7 +337,7 @@ describe("service activity", () => {
|
|
|
337
337
|
});
|
|
338
338
|
|
|
339
339
|
it("restarts each service through its manager", () => {
|
|
340
|
-
expect(restartCommand("herdr", 501)).toEqual({ file: "/
|
|
340
|
+
expect(restartCommand("herdr", 501)).toEqual({ file: "/bin/launchctl", args: ["kickstart", "-k", "gui/501/com.astrofoundry.herdr"] });
|
|
341
341
|
expect(restartCommand("astrogate", 501).args).toEqual(["kickstart", "-k", "gui/501/com.monadeo.astrogate"]);
|
|
342
342
|
expect(restartCommand("bridge", 501).args).toEqual(["kickstart", "-k", "gui/501/com.astrofoundry.astro-discord"]);
|
|
343
343
|
});
|