Skip to main content

Mac Agent Service Launcher

This page covers how to install the Mac Agent service launcher, configure the run interval, and deploy via MDM.

Install and Launch the Service

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 documentation.
  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. For example, change StartInterval to configure how often the agent runs, or configure other options to pass as ProgramArguments.
  4. Place the config file and executable in the /opt/device42/ directory.
  5. Place the .plist file in the /Library/LaunchDaemons/ directory.

Then run:

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

Make Changes to the .plist File

If you make changes to the .plist file, 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 verify 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 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 in the default /opt/device42 working directory.