From: Domonkos P. Tomcsanyi Date: Fri, 24 Jul 2020 14:21:52 +0000 (+0200) Subject: systemd: add reload target to systemd unit X-Git-Tag: v1.0.20200820~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a66219fa107e1bf0a03ebbbc405879c1f0a826c5;p=thirdparty%2Fwireguard-tools.git 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 [zx2c4: use exec for bash commands to reduce excess forks, and rewrite commit message] Signed-off-by: Jason A. Donenfeld --- 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]