Bash script to add optional installs for Munki

In Terminal command to mark a Munki optional install for installation, I showed a one-off command to mark a Munki optional install item for installation.

What if you want to do it in bulk, though? For example, if you’re scripting a thin image to install some software by default, but you want the option for your users to uninstall the software later (i.e., you don’t want the items to be managed install items).

I wrote a little script that will add various items of your choice to a the client machine’s SelfServeManifest.

The syntax gets a bit tricky with bash variable expansion and single quotes, so I did a bit of a hack to get it working (created a temporary variable to store the source variable surrounded by single quotes).


Posted

in

by

Comments

2 responses to “Bash script to add optional installs for Munki”

  1. […] using Plistbuddy to add to an array in a .plist file (specifically Munki's SelfServeManifest file): Bash script to add optional installs for Munki Terminal command to mark a Munki optional install for […]

  2. […] Bash script to add optional installs for Munki, I introduced a script that uses PlistBuddy to add optional install items to the client machine's […]

Leave a Reply

Your email address will not be published. Required fields are marked *