Posted on 08-18-2016 06:40 PM
I'm trying to create a popup message for users who are running low on boot drive space. I'm getting the free space of the boot volume and adding it to a description variable that I then call in the command to jamfhelper. But it doesn't work in jamfhelper (no description displayed)
#!/bin/bash
space=`diskutil info / | awk '/Free Space:/ {print $4 $5}'`
title="Drive Space Warning"
description="DNG has detected that your boot drive may almost be out of space! You only have $space free. Please contact DNG support if you need assistance freeing up space."
jamfHelper="/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper"
icon="/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertCautionIcon.icns"
"$jamfHelper" -windowType utility -title "$title" -description "$MSG" -button1 "OK" -icon "$icon" -alignDescription center
Solved! Go to Solution.
Posted on 08-19-2016 12:00 AM
Not sure if it's just a typo, but your variable is called "description" and the jamfHelper command is looking for "$MSG"...
I would also look for a different way to get the free space.
Future versions of OS X *cough* might use different output of diskutil info
, so your command might not work there.
Posted on 08-19-2016 12:00 AM
Not sure if it's just a typo, but your variable is called "description" and the jamfHelper command is looking for "$MSG"...
I would also look for a different way to get the free space.
Future versions of OS X *cough* might use different output of diskutil info
, so your command might not work there.
Posted on 08-19-2016 07:55 AM
Yep. That's what I get for working late. D'oh. >.<
Posted on 08-19-2016 07:56 AM
I haven't had a chance to test 10.12 yet... I guess I'll have to add an OS check in there.