-
Notifications
You must be signed in to change notification settings - Fork 27
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.
BlockUpdate Preflight:
For some of our labs, we've had complaints of machines installing updates at the loginwindow during class time. Usually, it is a non-issue, but there have been times when instructor stations have applied updates and class has been delayed by 5 or 10 minutes. There is now some functionality in the preflight script which will optionally block updates from a specific time. There are more details documented in the script here: https://github.com/jnraine/munkiserver/blob/3f950f87e28c805051eb9a38f60f2f10e68d2d4f/script/munki_scripts/preflight, but essentially, you will need to set values in /Library/Preferences/ManagedInstalls.plist BlockUpdateStartTime and BlockupUpdateEndTime (specified in 24 hour time). Optionally, you can also define BlockUpdateDays if you only want to limit which days the block occurs. BlockUpdateDays is a list, separated by commas, with the day number of 0 being Monday, 6 being Sunday.
Postflight timeout:
I've seen some issues where Munkiserver is under heavy load, can't cope, and will have client's postflight scripts been having a problem where postflight scripts take a long time to complete, so I've implemented 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.