Skip to content

Instantly share code, notes, and snippets.

@SamRothCA
Forked from anonymous/gist:696339cbed5a9227fa13
Last active August 29, 2015 14:22
Show Gist options
  • Save SamRothCA/af2c13c550b26f8af142 to your computer and use it in GitHub Desktop.
Save SamRothCA/af2c13c550b26f8af142 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