I've used dockutil outside of Casper for ages now it seems. But our group is moving towards Casper and I'm working on rebuilding our image with the Casper workflow.
I'm using dockutil 2.0, and I've tested my shell script manually. Everything seems to work fine for the most part.
I've added the script to our casper server (using afp if that might be a question to come up). But the script doesn't seem to work either when the script is part of the imaging process (tried 'at restart' and 'after'), or through Self Service. I could try pushing it with a policy, but I don't see how that would work any better at this point.
There's nothing in /var/logs/jamf.log about the script after imaging.
Is there something I'm missing?
#!/bin/bash
sudo dockutil --remove 'Launchpad' --allhomes
sudo dockutil --remove 'Mail' --allhomes
sudo dockutil --remove 'Contacts' --allhomes
sudo dockutil --remove 'Calendar' --allhomes
sudo dockutil --remove 'Notes' --allhomes
sudo dockutil --remove 'Maps' --allhomes
sudo dockutil --remove 'FaceTime' --allhomes
sudo dockutil --remove 'Photo Booth' --allhomes
sudo dockutil --remove 'iPhoto' --allhomes
sudo dockutil --remove 'Pages' --allhomes
sudo dockutil --remove 'Numbers' --allhomes
sudo dockutil --remove 'Keynote' --allhomes
sudo dockutil --remove 'iBooks' --allhomes
sudo dockutil --add /Applications/Firefox.app --after 'Safari' --allhomes
sudo dockutil --add /Applications/Google Chrome.app --after 'Firefox' --allhomes
sudo dockutil --add /Applications/Final Cut Pro.app --after 'Google Chrome' --allhomes
sudo dockutil --add /Applications/Adobe Photoshop CC 2014/Adobe Photoshop CC 2014.app --after 'Final Cut Pro' --allhomes
sudo dockutil --add /Applications/Cyberduck.app --after 'Adobe Photoshop CC 2014' --allhomes
sudo dockutil --add /Applications/Filezilla.app --after 'Cyberduck' --allhomes
sudo dockutil --add /Applications/Microsoft Office 2011/Microsoft Word.app --before 'iTunes' --allhomes
sudo dockutil --add /Applications/Microsoft Office 2011/Microsoft Excel.app --before 'iTunes' --allhomes
sudo dockutil --add /Applications/Microsoft Office 2011/Microsoft Powerpoint.app --before 'iTunes' --allhomes
sudo dockutil --add /Applications/Microsoft Office 2011/Microsoft Outlook.app --before 'iTunes' --allhomes
sudo dockutil --add /Applications/Skype.app --before 'iTunes'--allhomes
sudo dockutil --remove 'Downloads' --allhomes
sudo dockutil --add '~/Downloads' --view list --display folder --allhomes