Skip to main content

Call scripts on network changes

Project description

# 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:

up() {
# handle up state

down() {
# handle down state


case $state in

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/ up
/etc/connman-dispatcher/some_other_executable up

Scripts, as well as script folders are sorted by name.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

connman-dispatcher-0.0.7.tar.gz (3.3 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page