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:
- Download the Signed Mac Agent as described in the Signed Mac Agent documentation.
- Download the
.plistfile from the Device42 Autodiscovery tools page under MacOS Service Wrapper for the Discovery Agent. - Modify the
.plistfile as required based on your setup. For example, changeStartIntervalto configure how often the agent runs, or configure other options to pass asProgramArguments. - Place the config file and executable in the
/opt/device42/directory. - Place the
.plistfile 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/logor as otherwise configured in the.plistfile. - The
agent_local.logfile is in the default/opt/device42working directory.