Alternative to DEPnotify which supports Jamf and Munki in the same session?

DanJ_LRSFC
Contributor III

We currently use DEPnotify for our deployment workflow. However while it is capable of displaying Jamf messages and Munki messages, it can only display one or the other within a particular session. We need to be able to do both, we obviously use the Jamf methodology for our regular package deployment, but a number of software items we use DataJAR Auto-Update for and this uses Munki under the hood. Specifying both the Jamf and Munki switches to DEPnotify doesn't work, and it seems like development of the DEPnotify software has halted or been abandoned as there has been no new version since late 2020.

Is there an alternative with similar functionality that can do what we need? I looked at Splashbuddy but it seemed extremely complicated to set up, it seemed like you had to build it yourself with Xcode? This would be outside of our skillset.

8 REPLIES 8

Fluffy
Contributor III

I don't know how much work it is compared to DEPNotify (or if it will have the same problem), but IBM Notifier is an application that pushes popups/alerts through bash scripting. One of the popup UI choices is Onboarding UI, which would work similarly to DEPNotify. There are picture examples on the wiki page.

As an example, here is a page of their JNUC 2021 session and their scripts, which included an onboarding sample.

Hopefully this is something that could be useful for you.

@Fluffy IBM Notifier looks really slick, but it doesn't seem like it has any options for user input beyond buttons. We need to be able to input the computer name and role (e.g. staff/student) at deployment time.

EDIT: on further inspection it also doesn't look like it has any options to provide ongoing status information, e.g. what piece of software is currently being installed or how many more items are left to be installed before the computer is ready.

EDIT 2: oh I see, there's a script that communicates with it using a named pipe? Also, the video mentions HTML support, can we use that as a way to get input, or is it just for presentation purposes?

Hmm. It seems the only input argument is for the pop-up UI. In case you find it usable for something else: If you go to the Usage wiki page scroll down to -accessory_view_type and click on the dropdown, you'll see input as an option.

Screen Shot 2022-02-11 at 9.01.41 AM.png

Expand
#!/bin/sh

CURRENTUSER=$(ls -l /dev/console | awk '{print $3}')
NA_PATH="/Applications/IBM Notifier.app/Contents/MacOS/IBM Notifier"

sudo -u "$CURRENTUSER" "$NA_PATH" \
	-type "popup" \
	-title "Tutorial" \
	-main_button_label "OK" \
	-secondary_button_label "Cancel" \
	-accessory_view_type "input" \
	-miniaturizable \
	-always_on_top

Although, completing the onboarding does return 0, so you could continue the script to look for that to then proceed with a pop-up. But then again, this may be more work than you were asking for.

@Fluffy okay, but how do I get the information from that input box to use it in my script?

I'm still pretty green to bash scripting, so I'm learning this as I go. I have been planning on creating an onboarding UI for next school year, but have not started yet.

As a starting point, you can create a function for the pop-up, then tie that to a variable to use the returned value as an input somewhere else. Taking the example from above, here is a script that echoes the input from the pop-up.

Expand
#!/bin/sh

CURRENTUSER=$(ls -l /dev/console | awk '{print $3}')
NA_PATH="/Applications/IBM Notifier.app/Contents/MacOS/IBM Notifier"

user_input () {
	sudo -u "$CURRENTUSER" "$NA_PATH" \
		-type "popup" \
		-title "Tutorial" \
		-main_button_label "OK" \
		-secondary_button_label "Cancel" \
		-accessory_view_type "input" \
		-miniaturizable \
		-always_on_top
}

returned_input=$(user_input)
echo "$returned_input"

For your needs, you would change echo to whatever command you need to change computer names and such. We use Jamf School and have not dived too much into APIs or JSS commands, so I'm not sure how much I'd be able to help past this.

mm2270
Legendary Contributor III

@DanJ_LRSFC When you say you can only get info from Jamf or Munki, I assume this is because you are using the -jamf or -munki flags from DEPNotify. If so, have you considered forgoing those flags and just getting the info you need yourself from whichever log you need during your onboarding script? I know that means a bit more advanced scripting and legwork, but while the -jamf and -munki flags for DEPNotify are fine for the basics, they are just that - basic - and do not allow for much customization of what gets shown in the progress output. I've found that with some work and testing, you can get a much more polished and customized DEP workflow by getting the info you need yourself in the script rather than letting DEPNotify just parse the log.

And FWIW, I use IBM Notifier a bit these days, but it's not really geared for the type of onboarding DEPNotify is typically used for. It's not a 1:1 replacement in any way. I use IBM Notifier more for dialogs that I would normally use jamfHelper or Applescript for since it's much more versatile than either of those tools. Their "onboarding" dialog style is nice, but I see that more for after a device is set up, and you want to display some step by step instructions to a user on how to set up their email account for example. Not for DEP enrollment.

@mm2270 that's correct. It seems you can't combine -jamf and -munki when using DEPNotify, so whichever one you use "last" in the command line "wins".

I was looking at the source code to DEPNotify to try to understand what it does with the Jamf and Munki logs, but while it seems straightforward, I'm not sure I know how to translate what it does to bash script format.

In particular, I need to pick up messages from both files, but the Munki one won't even exist until after the Munki part of the process has been initiated further down in the script.

Also I'm not sure how I can get a process ID when starting a process, then loop around doing my DEPNotify status updates until that process has completed - that seems to be the core thing I would need to be able to do to replace the built-in functionality.

I can't reproduce the whole script here as it's copyrighted and is part of a project we paid DataJAR Professional Services for, but essentially I need the script to update DEPNotify status based on what's happening with these commands:

 

/usr/local/bin/jamf policy -event autoupdate
/usr/local/bin/jamf policy -event "${deploymentTrigger}"
/usr/local/bin/jamf policy

 

and then further down is

 

/usr/local/munki/managedsoftwareupdate --installonly

 

Also I've just tried DEPNotify on Monterey and the registration dialog doesn't display correctly, which prevents me from putting in the computer name and machine role.