This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
README | Thu Jul 31 15:18:52 -0700 2008 | |
| |
com.underpantsgnome.location_watcher.plist | Thu Jul 31 14:31:07 -0700 2008 | |
| |
install.sh | Wed Aug 13 09:10:26 -0700 2008 | |
| |
location_watcher | Thu Jul 31 14:31:07 -0700 2008 | |
| |
location_watcher.sh | Mon Sep 08 19:14:41 -0700 2008 | |
| |
sample_scripts/ | Fri Aug 01 12:44:43 -0700 2008 |
README
h2. What is this? location_watcher is a launchd controlled network location watcher h2. What does it do? It watches your network settings and if they change it looks to see if there is a script that should be run for this particular location. I'm using it because in the office I have servers that are accessible both internally and externally, but since they are on different IPs based on inside and outside and they are using virtual hosts it was a hassle. So instead of having to use different host names based on where I was, which I was doing initially, I can have this update my hosts file or anything else I want on a network change. h2. How do I use it? You can clone the repository <pre><code> git clone git://github.com/UnderpantsGnome/location_watcher.git </code></pre> or you can download the zip from "UnderpantsGnome":http://underpantsgnome.com/wp-content/uploads/location_watcher.zip When you have the files, run ./install from the directory and you are all set. h2. How do I configure it? The following configuration would run the script in LOCATIONS for the matching SSID, EN0IP or EN1IP when the network changes. So if you are on the WorkSSID wireless network it will execute ~/bin/location_watcher/office and so on. It trys to find the network in the following order SSID, EN0IP, EN1IP. <pre><code> LOCATIONS=(office home george) SSIDS=(WorkSSID homeSSID georgeSSID) EN0IPS=(192.168. 10.0.0. ) EN1IPS=(192.168. 10.0.0. ) </pre></code> You can also silence the notifications with <pre><code> USE_NOTIFICATIONS="false" </pre></code> By default it will use growlnotify to tell you what it is doing, it will fall back to using Finder alerts if it can't find growlnotify. Trust me, you are either going to want to install growlnotify or turn off notifications, the Finder alerts are annoying.







