Dr Stephen Strange wrote:
> I am running the CumuusMX weather program on an Mac Mini.
>
> [snip]
The "Right Way" to do this kind of thing on a Mac is to use launchd, which
is the Mac equivalent of systemd. (Or at least the "launch programs under
certain conditions" part of systemd.) That Stack Overflow answer actually
points to this solution when it says, "the cleanest way to run any program
or shell script at login time is described in @trisweb's answer". The answer
in question is at [1], and IMO it gives a reasonable summary of what you
need to do to launch your program through launchd.
If you find yourself dealing with launchd more than occasionally, I highly
recommend using LaunchControl [2], which is a GUI that shows all of the
launchd agents and daemons you have running and allows you to modify them,
with more guardrails and sanity checking than you'd have if you were just
editing the XML files by hand.
Hope this helps!
Benjamin
[1]
https://stackoverflow.com/a/13372744/371228
[2]
https://soma-zone.com/LaunchControl/