Skip to content

Instantly share code, notes, and snippets.

Created June 8, 2015 23:40
Show Gist options
  • Save anonymous/696339cbed5a9227fa13 to your computer and use it in GitHub Desktop.
Save anonymous/696339cbed5a9227fa13 to your computer and use it in GitHub Desktop.
CheckForGroup=`id -Gn $1`
if [[ "$CheckForGroup” == *”macstaff* ]]; then
curl -o --url macserver.cfsd16.org/test_profile.mobileconfig --output /Library/Management/test_profile.mobileconfig
sudo profiles -I -F /Library/Management/test_profile.mobileconfig
echo "You are a macstaff >> /var/log/login.log
exit 0
fi
if [[ "$CheckForGroup” == *”FHGrade09* ]]; then
curl -o macserver.cfsd16.org/Settings_for_FH_Test.mobileconfig —output/Library/Management/Settings_for_FH_Test.mobileconfig
sudo profiles -I -F /Library/Management/Settings_for_FH_Test.mobileconfig
echo "You are a student >> /var/log/login.log
exit 0
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment