Git Product home page Git Product logo

netwatcher's Introduction

NetWatcher daemon

Waits for IPv4 or IPv6 address changes on any interface.

Executes a utility (default ~/.netwatch) when an IP change is detected.

Only works on OS X.

Building

Run make. There are no dependencies.

Using NetWatcher

Usage: netwatcher [-qd] [-EO] [-e|-o] [-f UTILITY ]
-q: quiet mode
-d: debug mode, stay in foreground
-E: close UTILITY's stderr
-O: close UTILITY's stdout
-e: redirect UTILITY's stdout to stderr
-o: redirect UTILITY's stderr to stdout

NetWatcher will attempt to not execute UTILITY if it is already running, but will instead note that UTILITY should be run again if a change arrives while it is still running. If this happens enough times without UTILITY exiting, NetWatcher will get increasingly aggressive about killing the last invocation of UTILITY so that it can invoke it again.

If no UTILITY is specified, NetWatcher will chdir to the current user's home directory and set UTILITY to ./.netwatch

Bugs

NetWatcher uses daemon(3) which is deprecated. Launchd support patches welcome.

NetWatcher is verbose by default.

Authorship/Licence

This code is derived from Jeremy Friesner's public domain IP change detection code at:
https://public.msli.com/lcs/jaf/osx_ip_change_notify.cpp

Which in turn derives from:
http://developer.apple.com/technotes/tn/tn1145.html

The changes made Eric Kobrin are hereby released as CC0 1.0 (Public Domain)
https://creativecommons.org/publicdomain/zero/1.0/

netwatcher's People

Contributors

erluko avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.