goto : SpiffyTech : Utilities
NetRunner is a little utility I hacked together using the source code from NetGrowler. I ran into a situation where I had to run a script on my Mac each time it was assigned a new IP address. I couldn't find anything to do this easily, so I hacked together this little program to get the job done. It isn't perfect and there's certainly a lot more features that would be nice, however it worked for what I needed at the time.
The program works by running scripts or other programs that are placed in a special folder in your home folder. These folders are created when the NetRunner program is first started:
NetRunner/IPAddress/AquiredWhen a given network event happens, the scripts (if any) in the matching folder are executed.
NetRunner/IPAddress/Released
NetRunner/Ethernet/LinkUp
NetRunner/Ethernet/LinkDown
NetRunner/Airport/Connected
NetRunner/Airport/Disconnected
That's all there is to it. More features would be nice, but I didn't need them. The source code is free and licensed under the MIT license so if you want to do something else with it, you may.
Much thanks to Scott Lamb for NetGrowler which provided the inspiration and initial source code for NetRunner.