Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

My college requires a local gateway authentication webpage after connecting to their wifi, so I would like to make my macbook pro to automatically run curl with the proper user and password when I connect to their wifi ssid. I am not sure where I would check the ssid in bash, or what utility would automatically launch a command on connection to a certain ssid.

share|improve this question

1 Answer 1

There is a utility called MarcoPolo that can do things like this. There is also SleepWatcher, which allows you to run scripts on sleep/wake (which is usually when i find myself changing Wi-Fi networks anyway). And then there is always just having a cron or launchd job run periodically.

I've never used MarcoPolo, but if you go one of the other routes, you can get the name of the Wi-Fi network with this command:

networksetup -getairportnetwork en1 

(Replace en1 by your Wi-Fi interface name)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.