Repository navigation
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.
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.
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
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.
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_installsarray and sends an installed notification. - In certain cases (e.g. item was already current), removes items from
managed_installswithout sending a notification. - Updates
pending_countand writes/private/tmp/com.googlecode.munki.installatlogoutifPendingUpdateCountis non-zero — this file triggers installation at next login. - Records the number of items in
InstallResultsfor logging.
When ManagedInstallReport.plist contains items in the RemovalResults or RemovedItems arrays that match the LocalOnlyManifest, jamJAR:
- Removes those items from the
managed_uninstallsarray without sending notifications. - Records the number of items in
RemovalResultsfor logging.
- If
PendingUpdateCountis non-zero, jamJAR updatespending_countand creates theinstallatlogoutfile. - If
PendingUpdateCountreaches zero while jamJAR'spending_countwas previously higher, a "no updates pending" notification is sent and theinstallatlogoutfile is deleted. - The updated
pending_countis recorded for logging.
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.
If any items appear in InstallResults, RemovalResults, or RemovedItems arrays, jamJAR triggers a recon to update the client record in Jamf Pro.
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.
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.
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).