Created
March 29, 2012 05:02
-
-
Save acidprime/2233513 to your computer and use it in GitHub Desktop.
Try to guess the first Jamf Imaging of a machine - https://jamfnation.jamfsoftware.com/discussion.html?id=4120
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 | |
declare -x awk="/usr/bin/awk" | |
declare -x date="/bin/date" | |
declare -x pkgutil="/usr/sbin/pkgutil" | |
declare -xi MANAGE_EPOCH="$($pkgutil --file-info /usr/sbin/jamf | | |
$awk '/install-time/{print $NF;exit}')" | |
declare -x FIRST_BOOT_GUESS="$($date -r $MANAGE_EPOCH "+%Y-%m-%d %H:%M:%S")" | |
printf "<result>%s</result>\n" "$FIRST_BOOT_GUESS" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment