https://github.com/mtth/netstate
systemd-networkd hooks
https://github.com/mtth/netstate
Last synced: about 1 month ago
JSON representation
systemd-networkd hooks
- Host: GitHub
- URL: https://github.com/mtth/netstate
- Owner: mtth
- License: mit
- Created: 2024-12-05T05:06:45.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-08-29T20:53:30.000Z (10 months ago)
- Last Synced: 2025-12-26T02:59:23.770Z (6 months ago)
- Language: Rust
- Homepage: https://mtth.github.io/netstate/
- Size: 33.2 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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