-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDisplay Message JAMF binary.sh
57 lines (41 loc) · 1.43 KB
/
Display Message JAMF binary.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/sh
####################################################################################################
#
# ABOUT
#
# For simple end-user messages
# See: https://jamfnation.jamfsoftware.com/article.html?id=107
#
####################################################################################################
#
# HISTORY
#
# Version 1.0, 5-Nov-2014, Dan K. Snelson
#
####################################################################################################
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# JAMF Display Message
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
function jamfDisplayMessage() {
echo "${1}"
/usr/local/jamf/bin/jamf displayMessage -message "${1}" &
}
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# Variables
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
message="${4}" # Text of end-user message
if [ "${message}" == "" ]; then
echo "Error: Parameter 4 is blank; please specify a message to be displayed."
exit 1
fi
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# Program
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
jamfDisplayMessage "${message}"
exit 0