mpanighetti / install-or-defer

A framework for prompting users of Jamf Pro-managed Macs to install Apple software updates.
Apache License 2.0
148 stars 28 forks source link

Is there a way to run only secuirty updates run? #35

Closed burakcoskunn closed 4 years ago

burakcoskunn commented 4 years ago

Hello sir, first of all thank you a lot for this script.

your script working well for run all updates OS and Security updates. Is there a way run only security updates like i am using following script for security updates; https://github.com/jamf/Jamf-Nation-Scripts/blob/master/Apple_Software_Update_Search_v2.sh

homebysix commented 4 years ago

Hi @burakcoskunn - If I understand correctly, you want to use install-or-defer only for security updates and not for macOS updates?

Short answer: no. This incarnation of the script is meant to install all updates listed as Recommended: YES or Action: restart in the softwareupdate -l output.

However, due to the fact that most security updates require you to first have the latest macOS updates already installed, you could probably simulate the behavior you desire using the Jamf smart group you use for scoping. For example, you can target only the Macs that require Security Update 2019-001 for Mojave using this criteria:

Critical Update Needed: Security Update 2019-001 Mojave

However, be careful with that scope, because when a build greater than 18G1012 comes out, those newer builds may become false-positives. Regular expressions may help avoid this, but I don't have a foolproof one off the top of my head.

If you only want to install specific updates, then the install-or-defer script probably won't give you what you want without significant customization.

burakcoskunn commented 4 years ago

Clear sir. Thanks a lot for your time.