Good day everyone,
I'm hoping that I can get a second set of eyes on this script. It is designed to check the status of Find My Mac, and works find locally, but it is erroring out when I run it through a Jamf Policy.
Here is the script:
!/bin/bash
this script will check the status of Find My Mac. If it isn't running, it will end, otherwise it will execute the AppleScript below that
fmmStatus=$()
if [[ "$fmmStatus" = 0 ]]; then
echo "Find My Mac Not Running"
exit 1
else
osascript -e "tell application "System Events" to display dialog "Hey there!
IT requests you please stop using "Find My Mac" on this MacBook Pro as it has been found to interfere with our Mobile Device Management security settings.
Please go to System Preferences > Apple ID > Find My Mac and disable the checkbox for this feature.
If you have any questions please reach out to IT and we can help you out. Thanks!"
fi
exit 0
I receive the error message of -> Script result: 110:115: syntax error: A identifier can’t go after this “"”. (-2740)
Any help would be appreciated it.
Thank you.