Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Munkiserver preflight and postflight
While not required to use Munkiserver, we have included both a preflight and postflight script to be installed on your munki clients. These scrips primarily set the correct ClientIdentifier, per machine, and post various log and system profile files back to munkiserver after a munki run. You can find these files at
scripts/munki_scripts/ or view on Github
We've also included a few extra features that may expand the functionality of munkiserver over time, notes below.
For some labs, you may not desire machines to apply updates during the day. While it would be possible to modify the munki launchd tasks, it can be quite confusing and tedious. There is now some functionality in the preflight script which will optionally block updates from a specific time. This functionality is totally optional, and admins have to 'opt in' to this feature. To opt in, will need to set values in /Library/Preferences/ManagedInstalls.plist under the key names
- BlockUpdateStartTime - Start time of block update in 24 time, (e.g. "08:00")
- BlockUpdateEndTime - End time of block update in 24 time, (e.g. "18:00")
- BlockUpdateDays - set to days the block should take effect, defaults to all days. You can NOT set the value or set it to "All". If you would only like a specific set of days, define# define the value in a string like "0, 3, 5" to only block on Mon, Wed, Fri. 0 is Monday, 6 is Sunday
This preflight will only block updates when munki is called in
auto mode (which typically only occurs at the loginwindow). Manual checks via an admin or user will still go through.
Block Updates from 8 AM to 6 pm on Saturday and Sunday
<key>BlockUpdateStartTime</key> <string>8:00</string> <key>BlockUpdateEndTime</key> <string>18:00</string> <key>BlockUpdateDays</key> <string>5,6</string>
I've seen some issues where Munkiserver is under heavy load, can't cope, and will have client's postflight scripts 'process' for approximately 5 minutes. There is now a 90 second default to timeout in the postflight script on Line #36 of the postflight. You can optionally change this value by writing a value in /Library/Preferences/ManagedInstalls.plist PostflightTimeout.