Guest User

Untitled

a guest
Dec 13th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Policy IDs or custom trigger names
  4. # Bash arrays are specified like the provided example; surround custom triggers with
  5. # quotes, and leave policy ids as "bare" integers
  6. POLICIES=( "custom" "triggers" 523 32 )
  7.  
  8. for i in "${POLICIES[@]}"; do
  9. # test if array element is an integer, ie. a policy id
  10. if [ "$i" -eq "$i" ] 2>/dev/null
  11. then
  12. /usr/local/bin/jamf policy -id "${i}"
  13. else
  14. /usr/local/bin/jamf policy -event "${i}"
  15. fi
  16. done
Add Comment
Please, Sign In to add comment