An open API service indexing awesome lists of open source software.

https://github.com/mtth/netstate

systemd-networkd hooks
https://github.com/mtth/netstate

Last synced: about 1 month ago
JSON representation

systemd-networkd hooks

Awesome Lists containing this project

README

          

# `netstate(1)`

Run hooks on network state changes under `systemd-networkd`.

## Quickstart

`netstate` can be installed from the [AUR][]. The package includes a suitable
systemd unit file:

```sh
systemctl enable --user netstate
```

Executable files in `$XDG_DATA_HOME/netstate/hooks.d` will then be automatically
invoked on connectivity changes. For example, you can get a notification each
time with the following script:

```sh
# $XDG_DATA_HOME/netstate/hooks.d/10-notify.sh
notify-send -a netstate "Network state: $1"
```

See `man netstate` for more information.

[AUR]: https://aur.archlinux.org/packages/netstate