Here is the script I am currently using. I would like to convert it to Jamfhelper so I can use a logo which using the below console output workflow does not allow. Does anyone know how to convert this to use jamfhelper?
#!/bin/bash
user=`/bin/ls -l /dev/console | /usr/bin/awk '{ print $3 }'`
#get User ID
uid=$(id -u "$user")
#Display a message to the user and if they click OK it will open the Self Service Policy
#Message I want to Display- Make labels in Jamf
messageToDisplay="$4"
policyIDtoExecute="$5"
policyAction="$6"
#This will use a here doc MUST PUT ENTER/RETURN AFTER EOF
#EOF is an example. You can use ANY word.. IE SHUTTLECOCK
buttonClicked=$(launchctl asuser "$uid" /usr/bin/osascript << EOF
button returned of (display dialog "$messageToDisplay" buttons {"Delay Upgrade", "Upgrade"} default button 1)
EOF
)
echo "$buttonClicked"
# For paramter six we are going to view or execute
if [[ "$buttonClicked" == "Upgrade" ]];then
/bin/launchctl asuser "$uid" /usr/bin/open "jamfselfservice://content?entity=policy&id=$policyIDtoExecute&action=$policyAction"
fi