Placing a launch daemon without an MDM

k3vmo
Contributor II

I have a .pkg I created that starts a system process named Company [being the name of where I'm at].

My network admins need a system process to scan for when a device tries to connect via VPN.

It's to verify it's a company asset. I wrote the 'app' and .plist for a launch daemon.

I need to create a pack that has my .pkg in it - but also moves the .plist to where it needs to go - and loads it right away.

I don't know how to create a package that would include & move a .plist.

I don't yet have the MDM running to use the Jamf functions. I have to deploy the installer either manually or through Apple Remote Desktop (ARD)

The script to load the launch file would be easy.

Google has not served me well

3 REPLIES 3

jcarr
Release Candidate Programs Tester

If I understand you correctly, I think you're looking to have a package that lays down some items (executable and LaunchD plist I think), and then activates the LaunchD. I would think you would do this with a post install script. The payload would be the executable and the plist file. The post install script could verify the permissions on the files (LaunchD is particularly sensitive to file permissions) and then load the LaunchD with the launcctl command.

mm2270
Legendary Contributor III

Like @jcarr mentioned, you'll want to look at using a post install script added to your package that would load the LaunchDaemon after it lays it down in the correct place.

If you don't already have something like Composer and/or you need a packaging tool, I'd recommend looking at Packages.app. It will allow you to build your package to lay down the app and plist in the correct locations, and add that post install script to it.

ryan_ball
Valued Contributor

@k3vmo You can create a simple LaunchDaemon with this. I quickly put it together, but I will probably update it once I have a little more time to muck with it.

https://github.com/ryangball/simple-launchdaemon-creator

EDIT: Modified the script the be even simpler with dialog boxes which ask you all necessary information.