Skip to main content
Jamf Nation, hosted by Jamf, is the largest Apple IT management community in the world. Dialog with your fellow IT professionals, gain insight about Apple device deployments, share best practices and bounce ideas off each other. Join the conversation.
Posted: by clrlmiller
Downloads: 141
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...