Created
January 31, 2015 02:23
-
-
Save gjpalau/28240fa2e2a833ba1e4b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
AIRPORT="en1" | |
USER="$USER" | |
if [ "$USER" = Public ]; then | |
networksetup -removeallpreferredwirelessnetworks | |
ifconfig en0 down | |
networksetup -setairportpower en1 on | |
echo "Airport is now turned on." | |
networksetup -addpreferredwirelessnetworkatindex en1 STE-Guest 0 OPEN | |
echo "You are now connected to the STE-Guest Network." | |
exit 0 | |
else | |
networksetup -setairportpower en1 off | |
echo "Airport is turned off for your security." | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment