When running this script locally or with a manual policy trigger, it works fine, waiting for the user to click the button before exiting.
When the script is run with Casper Remote or by policy using any trigger except for manual, it does not wait for the user to click the button before exiting.
What am I missing?
#!/bin/bash
# waitExample.sh
click_value=`/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper -windowType hud -timeout 3600 -description "Click the button." -icon /Library/Application Support/JAMF/bin/jamfHelper.app/Contents/Resources/Message.png -button1 'Click Me'`
if [ "$click_value" == "0" ]; then
echo "User clicked button."
fi
exit 0