diff options
author | Domonkos P. Tomcsanyi <domi@tomcsanyi.net> | 2020-07-24 16:21:52 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-07-24 16:23:47 +0200 |
commit | a66219fa107e1bf0a03ebbbc405879c1f0a826c5 (patch) | |
tree | 635935fdfd8dbe930f1619e1056b7fd79a5b962a /src/systemd | |
parent | wincompat: fold random into genkey (diff) | |
download | wireguard-tools-a66219fa107e1bf0a03ebbbc405879c1f0a826c5.tar.xz wireguard-tools-a66219fa107e1bf0a03ebbbc405879c1f0a826c5.zip |
systemd: add reload target to systemd unit
Users can now run `systemctl reload wg-quick@wgnet0`, as described in
the wg-quick(8) man page. Note that this won't adjust Address=, DNS=, or
the various other non-wg(8) fields.
Signed-off-by: Domonkos P. Tomcsanyi <domi@tomcsanyi.net>
[zx2c4: use exec for bash commands to reduce excess forks, and rewrite
commit message]
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/systemd')
-rw-r--r-- | src/systemd/wg-quick@.service | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/systemd/wg-quick@.service b/src/systemd/wg-quick@.service index a9cbb58..dbdab44 100644 --- a/src/systemd/wg-quick@.service +++ b/src/systemd/wg-quick@.service @@ -15,6 +15,7 @@ Type=oneshot RemainAfterExit=yes ExecStart=/usr/bin/wg-quick up %i ExecStop=/usr/bin/wg-quick down %i +ExecReload=/bin/bash -c 'exec /usr/bin/wg syncconf %i <(exec /usr/bin/wg-quick strip %i)' Environment=WG_ENDPOINT_RESOLUTION_RETRIES=infinity [Install] |