Skip to main content

Mac Agent Service Launcher

Install and launch the Mac Agent service launcher by following these steps:

  1. Download the Signed Mac Agent as described in the Signed Mac Agent docs.
  2. Download the .plist file from the Device42 Autodiscovery tools page under MacOS Service Wrapper for the Discovery Agent.
  3. Modify the .plist file as required based on your setup and required options. For example, you can change the StartInterval to configure how often the agent will run, or configure other options to pass as ProgramArguments.
  4. You need the config file and executable in the /opt/device42/ directory.
  5. You need the .plist file in the /Library/LaunchDaemons/ directory.

Now run:

sudo launchctl load /Library/LaunchDaemons/<plist file name>

Make Changes to the .plist File

If you make changes to the .plist file, you need to unload and then load it again by running:

sudo launchctl unload /Library/LaunchDaemons/<plist file name>
sudo launchctl load /Library/LaunchDaemons/<plist file name>

To make sure that the file is correctly loaded, run:

sudo launchctl list | grep device42

Install via MDM

If you need to deploy in bulk to many machines, you can use MDM.

Package the Launch Agent using Composer and deploy it via the JSS, Casper Remote, or ARD.

Include the following as a post-flight script to set some permissions and load the agent. Right-click Scripts, click Shell Script, and then post flight.

#!/bin/bash
chown root "/Library/LaunchDaemons/NAMEOF.plist"
chmod 644 "/Library/LaunchDaemons/NAMEOF.plist"
launchctl load "/Library/LaunchDaemons/NAMEOF.plist"

Notes

  • By default, logs are stored under /var/log or as otherwise configured in the .plist file.
  • The agent_local.log file is under the default /opt/device42 working directory.