unifios-utilities/zerotier-one/20-zerotier.sh
jgstroud ecd8ee37e9
Add a zerotier VPN container (#191)
Co-authored-by: Jon Stroud <jon.stroud@keysight.com>
2021-07-02 22:34:16 -07:00

11 lines
428 B
Bash
Executable File

#!/bin/sh
CONTAINER=zerotier-one
# Starts a wireguard container that is deleted after it is stopped.
# All configs stored in /mnt/data/wireguard
if podman container exists ${CONTAINER}; then
podman start ${CONTAINER}
else
podman run --device=/dev/net/tun --net=host --cap-add=NET_ADMIN --cap-add=SYS_ADMIN --cap-add=CAP_SYS_RAWIO -v /mnt/data/zerotier-one:/var/lib/zerotier-one --name zerotier-one -d bltavares/zerotier
fi