Small service to monitor ConnMan
network state changes via
D-Bus
interface and execute corresponding shell scripts.
Arch Linux users can install the package directly from AUR.
Others should use CMake
installation procedure:
$ wget https://github.com/vsemyonoff/cmdd/archive/v1.0.2.tar.gz
$ tar xvf v1.0.2.tar.gz
$ cd cmdd-1.0.2
$ mkdir build && cd build
$ cmake -DCMAKE_BUILD_TYPE=Release ..
$ cmake --build .
$ sudo cmake --install .
Be sure that sdbus-cpp
library installed before.
/etc/cmdd.conf.d
structure:
➤ tree /etc/cmdd.conf.d/
/etc/cmdd.conf.d/
├── idle.d
│ └── 00-info -> ../scripts/info
├── offline.d
│ └── 00-info -> ../scripts/info
├── online.d
│ ├── 00-info -> ../scripts/info
├── ready.d
│ └── 00-info -> ../scripts/info
└── scripts
└── info
Place your script into /etc/cmdd.conf.d/scripts
, then symlink it into corresponding subfolder.
Each script will obtain 2 arguments while executing: ${1}
- new ConnMan
state
${2}
- previous state.