Scripts wont run sequential policies

Prillerh
New Contributor

We have been trying to run a script that calls multiple policies one after another, but we're running into an issue of the script ending after running the first policy. I've made an example script that looks like this:

#!/bin/bash

jamf policy -event policy1

jamf policy -event policy2

exit 0

Policy 1 just echos "1" and Policy 2 echos "2". However the logs for the script look like this:

Screen Shot 2021-12-03 at 2.58.25 PM.png

We've tried this with multiple different operating systems, including Monterey, Big Sur, and Catalina. Every OS has the same result. Does anyone know what may be going on?

1 REPLY 1

JamesJhoung
Contributor

Scoping and frequency for policy2 is all correct I assume?