need some help with DEPNotify Script

akaden
New Contributor II

Hi, need some help with DEPNotify Script.

I am trying to call a Jamf Policy after clicking Complete button. I am using this script: https://github.com/jamf/DEPNotify-Starter/blob/master/depNotify.sh

If anyone has any suggestions, how I can make this logic happen, thanks in advance!

4 REPLIES 4

Anonymous
Not applicable

Hi akaden, your informations are spare. I guess, you want to use the section inside the script, where the policies are called. read the description inside the script. It explains good, how to use the policies.
you have to use it at this way, where the policies are called by id. you also can call them by a user-trigger. In this case, you have to change the number (id) to the name of the user trigger.

#########################################################################################
# Trigger to be used to call the policy
#########################################################################################
# Policies can be called be either a custom trigger or by policy id.
# Select either "event", to call the policy by the custom trigger,
# or "id" to call the policy by id.
TRIGGER="id"


#########################################################################################
# Policy Variable to Modify
#########################################################################################
# The policy array must be formatted "Progress Bar text,customTrigger". These will be
# run in order as they appear below.
  POLICY_ARRAY=(
    "installiere program one,26"
    "installiere software office,27"
    "installiere tool three,28"
    "installiere my own software,12"
    "installiere something else,70"
    "installiere printertools,34"
  )

swapple
Contributor III

after the policy array runs, then you get to the complete button. How do you trigger a command after that?? In my example, once DEPNotify is done, I need the user to log out so FV kicks in. exploring what the best way to accomplish that would be.

Tribruin
Valued Contributor II

@swhps The starter script already has logic built in to it to log the user out if FV is current set to "deferred" (and testing mode is off). Is that what you looking for?

If not, you can always add commands to the bottom of the script (just before exit 0) that could be used to call additional jamf policies.

thta
New Contributor III

Is there a way to do a if statement in the depnotify.sh? 
What i'm looking for is a way to check if the Mac is Intel or Apple Silicon based and from that download specific programs.