Hi everybody! Hope someone can help...
At the moment I'm working on a "First-Setup-Script" to perform some basic steps on a new Mac. This works, more or less, how it should. Except of the notifications. After every finished step, I want to show a small notification to inform the servicedesk member, who will set up the client, that this step has been done and the script itself is in progress.
To realise this, I use the following command
osascript -e 'display notification "ActiveDirectory join has been done" with title "ActiveDirectory - Done"'
When I use this command only to test it, it works without any problem. But running the script, this only leads to a lot of error messages and the notification never shows up.
So I tried to use jamf instead:
jamf displayMessage -message "ActiveDirectory join has been done."
This works, but as long as the servicedesk member not click on OK, the next message won't be shown. Seems like there can only one message window at the moment be displayed.
Maybe someone can help? Is there another, better way to inform about the progress? Or can you figure out, why the notifications work when I enter the command in the Terminal, but not when it comes from the script?
Thanks a lot for any help!