Hello All,
Am testing my installation of Jamf Connect. The scripts open an Applescript and the user select Accept to trigger the policy to install Jamf Connect. The log below appears randomly when testing. Could I be missing something in the script to avoid the error?
#!/bin/bash
## This will display a pop up window and freeze Finder. The user will have to click Accept to start the next line 'Start the policy'
button=$(/usr/bin/osascript << EOF
tell application "Finder"
activate
display dialog "Jamf Connect is here! Please save your work and click Accept." buttons {"Accept"} with icon POSIX file "/Library/Application Support/SunPower/brandingimage.icns" with title "Important!"
end tell
EOF)
sleep 5
# run policy with returned value
/usr/local/bin/jamf policy -event "$button"