Last active
December 16, 2020 19:17
-
-
Save jps3/0f60d72b1222bf877751f0ab402689b8 to your computer and use it in GitHub Desktop.
Jamf 200 - Section 3 - Lesson 13 - Task 3 - Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Uses Spotlight to identify whether an Application Jamf Admin.app is installed | |
# (does not assume in /Applications/Jamf Pro/). | |
# If detected a Jamf inventory update is kicked off. | |
# | |
# | |
PATH=/usr/bin | |
count=$(mdfind -count 'kMDItemKind=="Application" && (kMDItemFSName=="Jamf Admin.app" || kMDItemCFBundleIdentifier=="com.jamfsoftware.JamfAdmin"c)' 2>&1) | |
if [[ $count -gt 0 ]]; then | |
sudo jamf recon -verbose >&2 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment