mirror of
https://github.com/newnius/Dockerfiles.git
synced 2025-12-16 02:46:45 +00:00
add zerotier
This commit is contained in:
15
zerotier/main.sh
Executable file
15
zerotier/main.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin
|
||||
|
||||
if [ ! -e /dev/net/tun ]; then
|
||||
echo 'FATAL: cannot start ZeroTier One in container: /dev/net/tun not present.'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
|
||||
|
||||
if ! [[ -z "${NETWORK_ID}" ]]; then
|
||||
zerotier-cli join ${NETWORK_ID}
|
||||
fi
|
||||
Reference in New Issue
Block a user