Created
April 15, 2018 16:38
-
-
Save jdoss/b7f9da0f38b3aed6069f9b413cab56c5 to your computer and use it in GitHub Desktop.
Reload systemd-networkd on WireGuard config change
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Path] | |
PathChanged=/etc/systemd/network/wg0.network | |
PathChanged=/etc/systemd/network/wg0.netdev | |
[Install] | |
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=WireGuard Monitor | |
After=network.target | |
[Service] | |
Type=oneshot | |
ExecStart=/usr/bin/systemctl restart systemd-networkd | |
[Install] | |
WantedBy=multi-user.target |
networkctl reload/renew/reconfigure does not change an active wireguard link.
unfortunately it doesn't work anymore. running systemd 252.6 here (debian bookworm), restarting systemd-networkd does not re-sync peers anymore (it worked with some previous version of systemd)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note that nowadays networkctl has options to reload/renew/reconfigure