aboutsummaryrefslogtreecommitdiff
path: root/wgconfd@.service
diff options
context:
space:
mode:
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