More notifications with Yo: The Yo Strikes Back29 Aug 2016
Last time, we took our first look at the fantastic Yo. This time, we’re going to o something useful - we’re going to open an item up in Managed Software Centre.
Let’s build our command to show the notification. Note that InstallElCap is the name of the relevent item in Munki. You could for example, replace it with
You want to schedule this you say? Looks like we’re going to need a LaunchAgent for that. And let’s do something useful - we would like our users to install 10.11 via Munki, but don’t want to make it a managed install as they wouldn’t be able to install anything else until they’ve taken the time to install it.
Let’s build our directory structure first. I’m going to put the script we’ll call in
/opt/grahamgilbert/bin, but you can put it anywhere you like - just remember to edit all the paths accordingly.
Now we’ve got our directory structure, create a file at
payload/grahamgilbert/bin/updatenotifier with the following content
Let’s make it executable
And for our launchagent, add the following at
And finally, let’s build the package
Now you’ve got a notification that pops up once an hour, on the hour that lets people know they should upgrade. Where could we improve on this? We could only bug them once a day as this is going to get incredibly annoying. We should also target those who need to upgrade. We also probably want to put our corporate logo on the pop up so our users know it came from us - well, guess what’s coming in the next couple of parts?