Skip to main content
Jamf Nation, hosted by Jamf, is a knowledgeable community of Apple-focused admins and Jamf users. Join us in person at the ninth annual Jamf Nation User Conference (JNUC) this November for three days of learning, laughter and IT love.
Posted: by clrlmiller
Downloads: 322
Download

Description

This will pull the version of Bradford Agent currently installed on Mac Systems. Useful for targeting systems running older versions and in need of updates. ``` #!/bin/sh ################################# # Original Code By Chris Tangora # Updated by Christopher Miller # of ITSD-ISS for JHU-APL # Dated: 20151001 ################################# # Look for the newer app version info if [[ -e "/Library/Application Support/Bradford Networks/Persistent Agent/CSA.app/Contents/Info.plist" ]]; then BPAv=$(/usr/bin/defaults read "/Library/Application Support/Bradford Networks/Persistent Agent/CSA.app/Contents/Info.plist" | grep CFBundleGetInfoString | awk {'print $3'} | sed -e 's/[";]//g') # Look for the older app version info elif [[ -e /Library/Application\ Support/Bradford\ Networks/Persistent\ Agent/CSA.app/Contents/Resources/bncsaui.xrs ]]; then BPAv=$( zipgrep Version /Library/Application\ Support/Bradford\ Networks/Persistent\ Agent/CSA.app/Contents/Resources/bncsaui.xrs | sed -e 's|.*\Version\:\ ||' -e 's|\<br.*||' ) # If nothing found, 'taint installed else BPAv="Not Installed" fi # Spit out the result echo "<result>$BPAv</result>" exit 0 ```

Preview

Generating Preview...