aboutsummaryrefslogtreecommitdiff
path: root/wgconfd@.service
blob: 1079fbfbdb9a3572b248b3ce26100742fab9bf6f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[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
RuntimeDirectory=wgconfd
CacheDirectory=wgconfd
ExecStartPre=+-/usr/sbin/ip link add %i type wireguard
ExecStartPre=+/usr/bin/wg setconf %i /etc/wireguard/%i.conf
ExecStart=/usr/bin/env wgconfd %i /etc/wireguard/%i.toml
StandardError=journal
SyslogLevelPrefix=true

[Install]
WantedBy=multi-user.target