Skip to content

Step by Step

macmule edited this page Nov 16, 2026 · 4 revisions

Step by Step

This page outlines the specific actions jamJAR performs when Munki runs on a client system, or when a Jamf Pro policy calls the jamJAR script directly.


ManagedInstallReport.plist

Munki generates ManagedInstallReport.plist in its Managed Installs directory after each run, prior to jamJAR's postflight execution. This plist is the primary information source jamJAR uses to determine what actions to take.


Postflight

jamJAR's postflight runs after Munki completes, regardless of what triggered Munki initially. The Munki postflight hook at /usr/local/munki/postflight is a bash shim that calls:

/usr/local/munki/jamJAR --postflight

Pending Items — Initial Check

Before processing install or uninstall results, jamJAR reads the PendingUpdateCount value from InstallInfo.plist and compares it against jamJAR's own pending_count stored in /Library/Preferences/com.jamf.jamJAR.plist.


Installs

When ManagedInstallReport.plist contains items in the InstallResults or InstalledItems arrays that are also in the client's LocalOnlyManifest, jamJAR:

  • Removes those items from the managed_installs array and sends an installed notification.
  • In certain cases (e.g. item was already current), removes items from managed_installs without sending a notification.
  • Updates pending_count and writes /private/tmp/com.googlecode.munki.installatlogout if PendingUpdateCount is non-zero — this file triggers installation at next login.
  • Records the number of items in InstallResults for logging.

Uninstalls

When ManagedInstallReport.plist contains items in the RemovalResults or RemovedItems arrays that match the LocalOnlyManifest, jamJAR:

  • Removes those items from the managed_uninstalls array without sending notifications.
  • Records the number of items in RemovalResults for logging.

Pending Items — Follow-up Check

  • If PendingUpdateCount is non-zero, jamJAR updates pending_count and creates the installatlogout file.
  • If PendingUpdateCount reaches zero while jamJAR's pending_count was previously higher, a "no updates pending" notification is sent and the installatlogout file is deleted.
  • The updated pending_count is recorded for logging.

Warning Items

Any warnings in ManagedInstallReport.plist are logged to /var/log/jamJAR.log. Matching title names are removed from the manifest. Warning counts are noted if Munki ran via its scheduled methods.


Updating Inventory

If any items appear in InstallResults, RemovalResults, or RemovedItems arrays, jamJAR triggers a recon to update the client record in Jamf Pro.


Modifying the Manifest via Jamf Pro Policy

The jamJAR policy script accepts items in parameters $4–$7. Each item (or comma-separated list of items) is passed individually to the binary:

Parameter Action
$4 Add item(s) to managed_installs
$5 Remove item(s) from managed_installs
$6 Add item(s) to managed_uninstalls
$7 Remove item(s) from managed_uninstalls
$9 Set any value to enable verbose logging to /var/log/jamJAR.log

Multiple items can be supplied as a comma-separated list (e.g. GoogleChrome,Firefox,Slack). Each title is processed individually.


Engage Mode — Triggering a Munki Run

Setting $8 to ENGAGE instructs the policy script to trigger a Munki run immediately after updating the manifest. The script runs these two commands in sequence:

/usr/local/munki/managedsoftwareupdate --checkonly
/usr/local/munki/managedsoftwareupdate --installonly

This causes Munki to check for and then install any pending items without waiting for the next scheduled Munki run or a user logout.

If $8 is not set, the manifest is updated but Munki is not triggered — the items will be processed on the next scheduled Munki run.


Pending Notifications at Login

The com.jamf.jamJAR LaunchAgent runs jamJAR --process-pending at each Aqua-session login. This surfaces or clears pending-item notifications for the logged-in user without triggering a full Munki run. (When using Notifier only).

Clone this wiki locally