From 87cdb11039ad78bdce426f59f3436a6c527f34fc Mon Sep 17 00:00:00 2001 From: Mike Matter Date: Tue, 16 Aug 2022 15:18:04 -0500 Subject: [PATCH] Workspace ONE Support Revised PR for Workspace ONE support. --- fragments/functions.sh | 3 +++ fragments/header.sh | 1 + fragments/main.sh | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/fragments/functions.sh b/fragments/functions.sh index 8dbccb3..32fbe06 100644 --- a/fragments/functions.sh +++ b/fragments/functions.sh @@ -61,9 +61,12 @@ displaynotification() { # $1: message $2: title message=${1:-"Message"} title=${2:-"Notification"} manageaction="/Library/Application Support/JAMF/bin/Management Action.app/Contents/MacOS/Management Action" + hubcli="/usr/local/bin/hubcli" if [[ -x "$manageaction" ]]; then "$manageaction" -message "$message" -title "$title" + elif [[ -x "$hubcli" ]]; then + "$hubcli" notify -t "$title" -i "$message" -c "Dismiss" else runAsUser osascript -e "display notification \"$message\" with title \"$title\"" fi diff --git a/fragments/header.sh b/fragments/header.sh index bde971b..0bcf4b1 100644 --- a/fragments/header.sh +++ b/fragments/header.sh @@ -81,6 +81,7 @@ LOGO=appstore # - mosylem Mosyle Manager (Education) # - addigy Addigy # - microsoft Microsoft Endpoint Manager (Intune) +# - ws1 Workspace ONE (AirWatch) # path can also be set in the command call, and if file exists, it will be used. # Like 'LOGO="/System/Applications/App\ Store.app/Contents/Resources/AppIcon.icns"' # (spaces have to be escaped). diff --git a/fragments/main.sh b/fragments/main.sh index 9a665c7..27ddb48 100644 --- a/fragments/main.sh +++ b/fragments/main.sh @@ -60,6 +60,11 @@ case $LOGO in LOGO="/Library/Intune/Microsoft Intune Agent.app/Contents/Resources/AppIcon.icns" if [[ -z $MDMProfileName ]]; then; MDMProfileName="Management Profile"; fi ;; + ws1) + # Workspace ONE (AirWatch) + LOGO="/Applications/Workspace ONE Intelligent Hub.app/Contents/Resources/AppIcon.icns" + if [[ -z $MDMProfileName ]]; then; MDMProfileName="Device Manager"; fi + ;; esac if [[ ! -a "${LOGO}" ]]; then if [[ $(sw_vers -buildVersion) > "19" ]]; then