[PATCH] systemd: add file wireguard.target
Martin Hauke
mardnh at gmx.de
Thu Apr 30 15:55:51 CEST 2020
Add file wireguard.target, which allows you to stop or restart all
instances.
---
src/systemd/wg-quick at .service | 1 +
src/systemd/wireguard.target | 2 ++
2 files changed, 3 insertions(+)
create mode 100644 src/systemd/wireguard.target
diff --git a/src/systemd/wg-quick at .service b/src/systemd/wg-quick at .service
index 7c5f9d1..c22f7b3 100644
--- a/src/systemd/wg-quick at .service
+++ b/src/systemd/wg-quick at .service
@@ -2,6 +2,7 @@
Description=WireGuard via wg-quick(8) for %I
After=network-online.target nss-lookup.target
Wants=network-online.target nss-lookup.target
+PartOf=wireguard.target
Documentation=man:wg-quick(8)
Documentation=man:wg(8)
Documentation=https://www.wireguard.com/
diff --git a/src/systemd/wireguard.target b/src/systemd/wireguard.target
new file mode 100644
index 0000000..8e59224
--- /dev/null
+++ b/src/systemd/wireguard.target
@@ -0,0 +1,2 @@
+[Unit]
+Description=Target to restart all parts of WireGuard
--
2.26.2
More information about the WireGuard
mailing list