Reviewing the script, the likely reason where the failure is occuring is at the point that the private group is being UNIX enabled in the Centrify Zone, most likely because the AD group doesn't yet exist; likely due to AD replication.
More importantly, you seem to be running a very outdated version of Centrify. Centrify hasn't required AD groups for UNIX private groups in a very long time and adupdate (although part of the package) has been deprecated in preference of adedit.
We should discuss your environment further and see the best way to get you to an updated version of Centrify.
Please private message me and we will arrange a meeting to discuss your environment further.
Thank you.