Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Policy IDs or custom trigger names
- # Bash arrays are specified like the provided example; surround custom triggers with
- # quotes, and leave policy ids as "bare" integers
- POLICIES=( "custom" "triggers" 523 32 )
- for i in "${POLICIES[@]}"; do
- # test if array element is an integer, ie. a policy id
- if [ "$i" -eq "$i" ] 2>/dev/null
- then
- /usr/local/bin/jamf policy -id "${i}"
- else
- /usr/local/bin/jamf policy -event "${i}"
- fi
- done
Add Comment
Please, Sign In to add comment