forked from zentralwerk/network
16 lines
376 B
Desktop File
16 lines
376 B
Desktop File
[Unit]
|
|
Description=Call wg-quick
|
|
PartOf=wireguard.service
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
{%- for endpoint in endpoints %}
|
|
ExecStart=-/bin/ip route add {{ endpoint.split(':')[0] }}/32 via {{ gateway }}
|
|
{%- endfor %}
|
|
ExecStart=/usr/bin/wg-quick up /etc/wireguard/%i.conf
|
|
ExecStop=/usr/bin/wg-quick down /etc/wireguard/%i.conf
|
|
RemainAfterExit=true
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|