aboutsummaryrefslogtreecommitdiff
path: root/wgconfd@.service
diff options
context:
space:
mode:
authorHristo Venev <hristo@venev.name>2019-03-19 10:14:23 +0200
committerHristo Venev <hristo@venev.name>2019-03-19 10:14:23 +0200
commite143b186a3eba9c03af20156ad3a2e729c638dc9 (patch)
tree20f966ffc8981d90ab5a94c3c6a86172f92fd3f2 /wgconfd@.service
parent517040083e7796f59c47f8afe6a782417b132c20 (diff)
BREAKING CHANGES
ifname is now passed as an argument before the config file. own_public_key is obtained from the interface.
Diffstat (limited to 'wgconfd@.service')
-rw-r--r--wgconfd@.service15
1 files changed, 15 insertions, 0 deletions
diff --git a/wgconfd@.service b/wgconfd@.service
new file mode 100644
index 0000000..d6e4127
--- /dev/null
+++ b/wgconfd@.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Configure WireGuard interface
+Wants=network-pre.target
+Before=network-pre.target nftables.service systemd-networkd.service NetworkManager.service
+
+[Service]
+Type=simple
+CapabilityBoundingSet=CAP_NET_ADMIN
+ExecStartPre=/usr/bin/wg setconf %i /etc/wireguard/%i.conf
+ExecStart=/usr/local/bin/wgconfd %i /etc/wireguard/%i.json
+StandardError=journal
+SyslogLevelPrefix=true
+
+[Install]
+WantedBy=multi-user.target