AWS Thinkbox Discussion Forums

OSX: Boot-time launcher start?

Just curious what the current preferred method is for automatically starting a launcher (and slave(s)) when an OSX machine boots.

Thanks.

There’s two ways that I’m aware of, one of which is only done on login and is per-user (this is the way we do it in the client installer, good for per-user UI stuff), and the other one is done on boot regardless of which user logs in (usually better for system stuff).

The first is creating a login item, which you can either do from the UI in the Users & Groups settings screen, or by running some AppleScript to do it for you. Here’s the command we use in the installers to set up the launcher:

osascript -e 'tell application "System Events"' -e 'make login item at end with properties {path:"${installdir}/DeadlineLauncher.app", hidden:false}' -e 'end tell'

The alternative would be to create a .plist file in /Library/LaunchDaemons. We use this for start the mongod process, if you used our repo installer to set it up on OSX. Here’s a good reference for how to do this:
developer.apple.com/library/mac … dJobs.html

The Launcher has, as usual, a configurable option to start the Slave(s) on that machine when it starts up, so whichever option you pick, you should theoretically only need to do it for the Launcher if you have that option enabled.

Hope this helps!

Cheers,
Jon

Privacy | Site terms | Cookie preferences