table of contents
NETWORKD-DISPATCHER(8) | NETWORKD-DISPATCHER(8) |
NAME¶
networkd-dispatcher - Dispatcher service for systemd-networkd connection status changes
SYNOPSIS¶
networkd-dispatcher [-h] [-S SCRIPT_DIR] [-T] [-v] [-q]
DESCRIPTION¶
Dispatcher daemon for systemd-networkd connection status changes. This daemon is similar to NetworkManager-dispatcher, but is much more limited in the types of events it supports due to the limited nature of systemd-networkd(8).
Desired actions (scripts) are placed into directories that reflect systemd-networkd operational states under SCRIPT_DIR and are executed when the daemon receives the relevant event from systemd-networkd.
The daemon listens for signals from systemd-networkd over dbus, so it should be very light on resources (e.g. no polling). It is meant to be run as a system-wide daemon (as root). This allows it to be used for tasks such as starting a VPN after a connection is established.
OPTIONS¶
-h, --help
-S, --script-dir=SCRIPT_DIR
-T, --run-startup-triggers
-v, --verbose
-q, --quiet
CONFIGURATION FILES¶
The systemd service reads /etc/default/networkd-dispatcher as an environment file for additional daemon arguments.
The scripts to be run on network changes are in subdirectories routable.d/, dormant.d/, no-carrier.d/, off.d/, carrier.d/, degraded.d/, configured.d/, configuring.d/ inside SCRIPT_DIR. The default value for SCRIPT_DIR is /etc/networkd-dispatcher:/usr/lib/networkd-dispatcher.
For information about the network operational states exposed by systemd, see networkctl(1).
ENVIRONMENT¶
Scripts are executed with some environment variables set. Some of these variables may not be set or may be set to an empty value, dependent upon the type of event. These can be used by scripts to conditionally take action based on a specific interface, state, etc.
RESOURCES¶
SEE ALSO¶
07/11/2024 |