Skip to content

Instantly share code, notes, and snippets.

Last active Aug 16, 2022
What would you like to do?
export PATH=/usr/bin:/bin:/usr/sbin:/sbin
jamfHelper="/Library/Application Support/JAMF/bin/"
description="Your Mac has important operating system updates available."
button1="See Updates"
icon="/Library/Application Support/YourCompany/yourlogo.png"
title="Update Notification"
heading="Please Update macOS"
"$jamfHelper" -windowType utility -description "$description" -title "$title" -heading "$heading" -button1 "$button1" -icon "$icon"
loggedInUser=$( scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }' )
sudo -u "$loggedInUser" open ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment