skip to navigation
skip to content

Not Logged In

connman-dispatcher 0.0.7

Call scripts on network changes

Latest Version: 0.0.8

# Description

Run scripts on network state changes

# Install

pip install connman-dispatcher [--user]


# Usage

$ connman-dispatcher -h
usage: connman-dispatcher [-h] -p PATH

Scripts are run from folders setted in -p argument
One can set more than one folder.

When network state changes, each script is executed with either 'up' or 'down'
argument, depening on the current network state.

For example, if connman-dispatcher was run like this:

connman-dispatcher -p /etc/connman-dispatcher

And we have some scripts in bash in this folder, something like:

```bash
up() {
# handle up state
}

down() {
# handle down state
}

state="$1"

case $state in
up)
up
;;
down)
down
;;
esac
```

When network state changes from 'down' to 'up', each script in '/etc/connman-dispatcher'
will be executed with 'up' argument, like this:

/etc/connman-dispatcher/10_handle_network_state_change.sh up
/etc/connman-dispatcher/some_other_executable up


Scripts, as well as script folders are sorted by name.  
File Type Py Version Uploaded on Size
connman-dispatcher-0.0.7.tar.gz (md5) Source 2014-03-01 3KB
  • Downloads (All Versions):
  • 5 downloads in the last day
  • 129 downloads in the last week
  • 240 downloads in the last month
  • Author: Alexandr Skurikhin
  • Home Page: http://github.com/a-sk/connman-dispatcher
  • License:
    Copyright (c) 2014 Alexandr Skurikhin
    
    Permission to use, copy, modify, and/or distribute this software for any
    purpose with or without fee is hereby granted, provided that the above
    copyright notice and this permission notice appear in all copies.
    
    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
    WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
    MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
    ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
    OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  • Package Index Owner: Alexander.Skurihin
  • DOAP record: connman-dispatcher-0.0.7.xml