Disclaimer I'm trying to pick up learning both Bash scripting and LaunchAgents to make my job easier (and to take more advantage of Jamf Pro), so I'm quite the noob with it.
I can't get the script to which my LaunchAgent is pointing to run at login. I've tested the script, checked permissions on it, and manually ran it on a target computer, and all is well with the script itself. That leads me to believe that the LaunchAgent either isn't loading or isn't working properly. I've got the .plist stored in /Library/LaunchAgents. Here's the contents of the .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.hcschools.dockscript</string>
<key>Program</key>
<string>/Library/Scripts/HCSchools/dockutilscript.sh</string>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
and here is the script itself:
#!/bin/bash
dockutil --add /Applications/Microsoft Word.app --allhomes --no-restart
dockutil --add /Applications/Microsoft Excel.app --allhomes --no-restart
dockutil --add /Applications/Microsoft OneNote.app --allhomes --no-restart
dockutil --add /Applications/Microsoft PowerPoint.app --allhomes --no-restart
dockutil --add /Applications/Microsoft Outlook.app --allhomes --no-restart
dockutil --add /Applications/Google Chrome.app --allhomes --after Safari --no-restart
dockutil --add /Applications/Self Service.app --allhomes --position end --no-restart
dockutil --remove 'Contacts' --allhomes --no-restart
dockutil --remove 'Maps' --allhomes --no-restart
dockutil --remove 'iBooks' --allhomes --no-restart
dockutil --remove 'Siri' --allhomes
Any ideas why it won't load?
