Last active
October 11, 2019 20:33
-
-
Save smashism/ce0781a3079faa291f7f921a4344dc7d to your computer and use it in GitHub Desktop.
Add this to a policy in Jamf Pro to send a notification in a more controlled manner than the Start/End notifications in user interaction settings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### | |
# | |
# Name: management-action-by-policy.sh | |
# Description: This script is designed to run with policies to use | |
# Management Action.app to send a push notification to | |
# a managed Mac. | |
# Use: 1- Add script to Jamf Pro server, and optionally add | |
# parameter lables that match the parameters below. | |
# 2- Add to a policy, populating the parameters with | |
# the text you'd like to see in the notification bubble. | |
# Note: There is limited space in a bubble so these notifications | |
# need to be brief. You can get away with one decent-sized | |
# sentence or two short sentences. If you use the subtitle | |
# it eats into the space of the message text. | |
# Author: Emily KW | |
# Created: 2019-10-11 | |
# | |
### | |
title="" # "string" | |
subtitle="" # "string" | |
message="" # "string" | |
[ "$4" != "" ] && [ "$title" == "" ] && title=$4 | |
[ "$5" != "" ] && [ "$subtitle" == "" ] && subtitle=$5 | |
[ "$6" != "" ] && [ "$message" == "" ] && message=$6 | |
"/Library/Application Support/JAMF/bin/Management Action.app/Contents/MacOS/Management Action" -title "$title" -subtitle "$subtitle" -message "$message" | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment