Steps when you install Jamf from QuickAdd

robmorton
Contributor

Odd question, but I am trying to determine the process of how jamf installs in our specific case. So we can deploy a QucikAdd package and everything goes through fine.

For us, we use AD Groups to exclude computers from getting certain software or software updates. Our policies are configured to exclude them. We have a script that runs every 15 minutes to keep our static groups in sync with the AD groups.

The problem, the static groups can only contain systems that are already enrolled in Jamf. This means that on initial enrollment, they could get software that they are not suppose to. So my question is in the QuickAdd Package postinstall script, it has

$jamfCLIPath enroll -invitation BLAH -noPolicy
enrolled=$?
if [ $enrolled -eq 0 ]
then
  $jamfCLIPath update
  $jamfCLIPath policy -event enrollmentComplete
  enrolled=$?
fi

If I just put a sleep in there so it becomes...

$jamfCLIPath enroll -invitation BLAH -noPolicy
enrolled=$?
if [ $enrolled -eq 0 ]
then
  $jamfCLIPath update
  sleep 1800
  $jamfCLIPath policy -event enrollmentComplete
  enrolled=$?
fi

Would that prevent the recurring check-in from happening for 30 minutes? Does enrollmentComplete need to finish prior to the recurring checkins just naturally happening?

Can anyone think of an easier/better way?

0 REPLIES 0