33 lines
886 B
SYSTEMD
33 lines
886 B
SYSTEMD
[Unit]
|
|
Description=Podman container-mullvad.service
|
|
Wants=network-online.target
|
|
After=network-online.target
|
|
RequiresMountsFor=%t/containers
|
|
BindsTo=pod-torrent.service
|
|
After=pod-torrent.service
|
|
|
|
[Service]
|
|
Environment=PODMAN_SYSTEMD_UNIT=%n
|
|
Restart=on-failure
|
|
TimeoutStopSec=70
|
|
ExecStartPre=/bin/rm -f %t/%n.ctr-id
|
|
ExecStart=/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon --rm \
|
|
--pod-id-file %t/pod-torrent.pod-id \
|
|
--sdnotify=conmon --replace -d \
|
|
--name=mullvad \
|
|
--privileged \
|
|
--device /dev/net/tun \
|
|
-e PUID=1000 \
|
|
-e PGID=1000 \
|
|
-e TZ=Europe/Brussels \
|
|
-v mullvad-openvpn:/vpn:Z \
|
|
--label "io.containers.autoupdate=registry" \
|
|
docker.io/dperson/openvpn-client
|
|
ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id
|
|
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
|
Type=notify
|
|
NotifyAccess=all
|
|
|
|
[Install]
|
|
WantedBy=default.target
|