The Addigy Self Service application (called MacManage.app) provides the ability to send custom prompts to end-users. Below is an example script that can be altered to fit the desired functionality.
#!/bin/bash
/Library/Addigy/macmanage/MacManage.app/Contents/MacOS/MacManage action=notify title="Test Prompt" description="This is a test prompt" closeLabel="Close" acceptLabel="Accept" timeout=6000 forefront=false;
The script above would produce the following prompt on a device.
Note: Self Service prompts are not blocked by Do Not Disturb if it is enabled on a device.
Customization Options for MacManage Notifications
Self Service notifications support customization in four areas:
Text Content and Layout
Supported:
Title Text - The text within the "" can be altered to change the text the user sees. This would change the Test Prompt text seen in the screenshot above (displayed in bold by default).
Description Text - The text within the "" can be altered to change the text the user sees. This alters the "This is a test prompt" text seen in the screenshot above.
Line Breaks
Unicode Characters
Bullet Points
Emojis
Not Supported:
Rich Text Formatting
Font Size or Font Style Changes
Clickable Links Within the Description
HTML, Markdown, or RTF
Example:
description="🚨 Action Required Next steps: • Review documentation • Complete required action • Click Continue when finished"
Buttons and User Actions
Supported:
- Up to two buttons per prompt
-
Custom button labels using closeLabel and acceptLabel.
- The text within the "" can be altered to change the text the user sees on the close (left most) button. This alters the text found on the button shown as Close in the screenshot above.
- The text within the "" can be altered to change the text the user sees on the accept (right most) button. This alters the text found on the button shown as Accept in the screenshot above.
- Conditional scripting based on user selection
- Optional timeout behavior - The value given to this flag/attribute is in seconds. It can be altered to change the amount of time before the prompt automatically closes. A visual of this can be seen on the text "This window will close automatically in 5971 seconds." In the screenshot above, where the total seconds is what can be altered.
- Non-closable prompts using closable=false - Used to make a prompt not closable and without a button. Should not have closeLabel or acceptLabel. Valid values are true or false. When closable is omitted or set to true, the notification will default to having just the "Ok" button.
Example
Omitting the closeLabel and acceptLabel flags/attributes will default the prompt to having only an OK button displayed to the user. Here is an example of a script and prompt with only the OK button used. With this configuration, selecting the OK button will return 1 (error), which is used for if statements.
#!/bin/bash
if /Library/Addigy/macmanage/MacManage.app/Contents/MacOS/MacManage action=notify title="Test Prompt" description="This is a test prompt" timeout=6000; then
echo "User selected Ok"
exit 0
fiOmitting the timeout flag/attribute additionally removed the automatic countdown timer of when the prompt will close, as well as not force close the prompt. The prompt will thus remain displayed to the user indefinitely until the user acknowledges it. Here is an example script without using a timeout (forefront=true will put the dialog on the top of the user's desktop).
#!/bin/bash
/Library/Addigy/macmanage/MacManage.app/Contents/MacOS/MacManage action=notify title="Test Prompt" description="This is a test prompt" forefront=trueBelow is an example with conditional logic
if MacManage action=notify ...; then # User selected acceptLabel else # User selected closeLabel or prompt timed out fi
Dynamic Content via Shell Command Expansion
Description text supports shell command substitution. Commands inside $() are executed by the shell before the prompt is displayed, and the resulting output is inserted as plain text.
Supported:
- Single commands
- Piped commands using grep, awk, or sed
- Variable expansion
- Filtered or formatted command output
Example
description="Device Info Hostname: $(hostname) User: $(whoami) macOS: $(sw_vers -productVersion)" description="Security Status FileVault: $(fdesetup status | head -n 1)"
Best Practices
- Keep output short and predictable
- Filter verbose commands
- Avoid slow or blocking commands
- Expect plain text output only
Visual Customization and Prompt Behavior
Supported:
- Custom Self Service Logo via deployed .icns file
- Forefront - control if the prompt presented to the user comes to the foreground of their device or not. Valid values are true or false. When forefront is omitted, the notification will not come to the foreground.
Not Supported:
- Custom Fonts
- Color Changes
- Layout or Spacing Changes
Complete Reference Example
The following example demonstrates a full Self Service notification script using plain text layout with bullets and emojis, two buttons (FAQ and Continue), a required acknowledgment flow, and external documentation access via button.
#!/bin/bash
# Custom MacManage Prompt Template
# Two button prompt using FAQ and Continue
#
# Notes
# - MacManage prompts support plain text only
# - Line breaks work
# - Unicode works (bullets and emojis)
MacManage="/Library/Addigy/macmanage/MacManage.app/Contents/MacOS/MacManage"
# Editable variables
Title="Title Here"
FAQ_URL="https://example.com/faq"
FAQ_ButtonLabel="FAQ" # Left button (closeLabel)
Continue_ButtonLabel="Continue" # Right button (acceptLabel)
TimeoutSeconds=600
BringToFront=true
Description="🚨 Action Required
Please complete the following steps:
• Step 1: Open the FAQ for instructions
• Step 2: Follow the enrollment steps
• Step 3: Return here and click Continue
"
# Prompt loop
# - Continue returns exit code 0 and exits the script
# - FAQ returns a non-zero exit code, opens the URL, then re-prompts
# - Timeouts also return non-zero and will follow the same path
while true; do
"$MacManage" action=notify \
title="$Title" \
description="$Description" \
closeLabel="$FAQ_ButtonLabel" \
acceptLabel="$Continue_ButtonLabel" \
timeout="$TimeoutSeconds" \
forefront="$BringToFront"
rc=$?
if [[ $rc -eq 0 ]]; then
exit 0
fi
/usr/bin/open "$FAQ_URL"
done
Note: Self Service does not distinguish between a user clicking the closeLabel and the prompt timing out. Both return a non-zero exit code. If you do not want the FAQ to open on timeout, remove the timeout or set it to a high value.
Example Customized Prompt with Variables
#!/bin/bash
# Adjust these variables as they will replace the text in the flags
title="A Notification"
description="Example of a description text"
acceptText="Accept"
closeText="Close"
timeOut=600
forefront="False"
if /Library/Addigy/macmanage/MacManage.app/Contents/MacOS/MacManage action=notify title="${title}" description="${description}" closeLabel="${closeText}" acceptLabel="${acceptText}" timeout="$timeOut" forefront="$forefront"; then
# executes a desired command if the user clicks the Accept label.
echo "Accept label clicked"
exit 0
else
# executes a desired command if the user clicks the Close label.
echo "Close label clicked"
exit 1
fi
The script above details how a command can be run based on the user's interaction with the prompt. The if statement returns true (exit 0) if the user clicks the Accept label and false (exit 1) if the user clicks the Close label.