I needed to change the hash bang to #!/bin/bash and also modify line 55 to have this work from JAMF Pro.
Line 55 I changed from $USER="$3" to USER="$3" , i.e dropped the $ at the start.
Just as an aside and for anyone interested in this process, I'll likely remove the third line which does something for our own use as we specify StartDaemonOnAppLaunch using a configuration profile.
I needed to change the hash bang to #!/bin/bash and also modify line 55 to have this work from JAMF Pro.
Line 55 I changed from $USER="$3" to USER="$3" , i.e dropped the $ at the start.
Just as an aside and for anyone interested in this process, I'll likely remove the third line which does something for our own use as we specify StartDaemonOnAppLaunch using a configuration profile.
Cheers.