Similar to UsingLaunchd, this is a way to launch a worker on a mac without losing DNS resolution.

First, write a script that will start the worker - in this example, /opt/worker/start. It should be designed to run as root, and to assume the identity of the proper worker user.

Then, invoke it as

/usr/libexec/StartupItemContext /opt/worker/start

StartupItemContext? can be invoked anywhere, as root - from an SSH connection, or from an automated process such as cron or cfengine.

Last modified 4 years ago Last modified on Jan 10, 2017, 3:38:51 PM