Hello all.
Since upgrade to Big Sur, the following EA script seems not to work properly anymore, as it always gives result "Not available". Any idea how to fix this?
#!/bin/sh
apiURL="https://xxx.jamfcloud.com/JSSResource/computers/udid/"
apiUser="xxx"
apiPass="xxx"
MacAdd=$( /usr/sbin/networksetup -getmacaddress en0 | /usr/bin/awk '{ print $3 }' | /usr/bin/sed 's/:/./g' )
udid=$(/usr/sbin/system_profiler SPHardwareDataType | /usr/bin/awk '/Hardware UUID:/ { print $3 }')
siteName=$(/usr/bin/curl -s -u ${apiUser}:${apiPass} "${apiURL}${udid}" | /usr/bin/xpath '/computer/general/site/name[1]/text()' 2>/dev/null)
if [[ $siteName ]]; then
echo "<result>${siteName}</result>"
else
echo "<result>Not available</result>"
fi
Thank you and best regards
Christian