In order to start the sd-agent on boot we need to make use of launchd and launchctl.
This article is for our v1 agent and will soon be deprecated.
- Download the agent to your Mac, extract the archive and copy the contents to
curl -LO https://www.serverdensity.com/downloads/sd-agent.tar.gz tar xvfz sd-agent.tar.gz sudo mv sd-agent /Users/Shared/
- Update the config.cfg file to include your SD URL and device agent key.
sudo nano /Users/Shared/sd-agent/config.cfg
- Download the plist file and save it at
curl -LO http://archive.serverdensity.com/com.serverdensity.agent.plist sudo mv com.serverdensity.agent.plist /Library/LaunchDaemons/
- Run the following commands to give the correct permissions and load the plist file with launchctl
sudo chown root /Library/LaunchDaemons/com.serverdensity.agent.plist sudo chgrp wheel /Library/LaunchDaemons/com.serverdensity.agent.plist sudo launchctl load /Library/LaunchDaemons/com.serverdensity.agent.plist