la5nta / pat

A cross-platform Winlink client written in Go
https://getpat.io
MIT License
490 stars 86 forks source link

Mac commands for "Running Pat as a background service" #452

Open mwwoodm opened 4 months ago

mwwoodm commented 4 months ago

It'd be great if you would be able to include the UNIX commands for "Running Pat as a background service" on Mac. I've figured out that the UNIX command is lunchctl, but the command "sudo launchctl start gui/$UID/pat" doesn't give a new pat process under ps the way the command "pat http" does.

kd8drx commented 3 months ago

Every Unix handles this different (though most still use BSD's init in some form, AFAIK). LaunchCtl is a special, unique creature that has a lot of quirks owing to macOS' tighter sandboxing and security requirements.

The solution here would be providing the necessary launchDaemon files, either in package or via documentation.

Re: #456, If we go forward with a Brew.sh distribution, there is some nice logic there for providing launchDaemons if requested by the user: https://docs.brew.sh/Formula-Cookbook#service-files