Skip to content

Install Cached Packages

Darren Wallace edited this page Nov 8, 2018 · 1 revision

Packages

Packages can be cached, to be installed via a postinstall_script defined within an items pkginfo in Munki.

An example is given below:

#!/bin/bash

#
# Copyright (c) 2017, dataJAR Ltd.  All rights reserved.
#

# PKG name to look for
pkgName="gen-pkg-microsoft-office2016-vl-serializer-2.0.pkg"

# Location of jamf cached packages
waitingRoom="/Library/Application Support/JAMF/Waiting Room"

# If pkgName is on waitingRoom, install it then tidy up.
if [ -e "${waitingRoom}"/"${pkgName}" ]
then
	echo "Found ${pkgName}, installing..."
	/usr/sbin/installer -pkg "${waitingRoom}"/"${pkgName}" -target /
	/bin/rm "${waitingRoom}"/"${pkgName}"
	/bin/rm "${waitingRoom}"/"${pkgName}".cache.xml
fi

Use cases

A few examples of this use case are: Adobe Central storage in Munki of generic (unlicensed) Adobe installers, serving multiple customers each with their own licenser installer.

  1. Package each customer's Adobe licenser with a specific name, adding them to the relevant Jamf Pro servers
  2. Setup each Adobe auto-update Policy to first cache the customer's Adobe license package
  3. Add the jamJAR Script to the same policy as an After priority (don't forget to add the relevant Adobe install to the "$4 (Add to installs)" parameter
  4. Add a postinstall_script in the pkginfo for each Adobe installer. This script should be simalur (or even the same) as the example above.
  5. Edit the "pkgName" variable to match the name of the package in step 1

Microsoft Office Suite Central storage in Munki of generic (unlicensed) Microsoft Office for Mac installers, serving multiple customers each with their own Volume licenser installer.

  1. Add each customer's Microsoft Office Volume licenser with a specific name, adding them to the relevant Jamf Pro servers
  2. Setup each Microsoft Office auto-update Policy to first cache the customer's Microsoft Office license package
  3. Add the jamJAR Script to the same policy as an After priority (don't forget to add the relevant Microsoft Office install to the "$4 (Add to installs)" parameter
  4. Add a postinstall_script in the pkginfo for each Microsoft Office installer. This script should be simalur (or even the same) as the example above.
  5. Edit the "pkgName" variable to match the name of the package in step 1