Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save matthewbodaly/be92b897b13a5e3d7ba6a5465f5d388f to your computer and use it in GitHub Desktop.
Save matthewbodaly/be92b897b13a5e3d7ba6a5465f5d388f to your computer and use it in GitHub Desktop.
ea_check_for_config_profile.sh
#!/bin/bash
CONFIGURATION_PROFILE_UUID="43EA456A-C3F4-42F8-B752-E285385D0838"
computerConfigProfiles=$(profiles -Lv | grep "name: $4" -4 | awk -F": " '/attribute: profileIdentifier/{print $NF}')
if [[ "$computerConfigProfiles" == *$CONFIGURATION_PROFILE_UUID* ]]; then
configCheckResult='T'
else
configCheckResult='F'
fi
printf "<result>%s</result>" "$configCheckResult"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment