provide optional systemd service

pull/1/head
dadevel 4 years ago
parent f97b258b26
commit 0515fafaf8
No known key found for this signature in database
GPG Key ID: 1A8A9735430193D5

@ -34,3 +34,5 @@ Or connect a container to it.
podman run -it --rm --network ns:/var/run/netns/my-vpn alpine wget -O - https://ipinfo.io
~~~
You can find a `wg-quick@.service` equivalent at [extras/systemd/wg-netns@.service](./extras/systemd/wg-netns@.service).

@ -0,0 +1,16 @@
[Unit]
Description=WireGuard Network Namespace (%i)
Wants=network-online.target nss-lookup.target
After=network-online.target nss-lookup.target
[Service]
Type=oneshot
RemainAfterExit=yes
Environment=WG_ENDPOINT_RESOLUTION_RETRIES=infinity
ExecStart=wg-netns up %i
ExecStop=wg-netns down %i
[Install]
WantedBy=multi-user.target
Loading…
Cancel
Save