I wrote a process for my network team to scan for when a user connects to the company through VPN. I use a post-install script to load a Launch Agent - however, I can't get the launch agent to start -- without the user restarting. I don't know what my next step to troubleshoot would be
The agent script is:
#!/bin/sh
function runCompany
{
cat << EOF > /Library/LaunchAgents/com.highmark.Highmark.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.highmark.Highmark</string>
<key>Program</key>
<string>/usr/local/bin/Highmark</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
</dict>
</plist>
EOF
launchctl load /Library/LaunchAgents/com.highmark.Highmark.plist
}
runCompany