1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-26 00:38:37 +00:00
dockerfiles/tinc/docker-entrypoint.sh

20 lines
324 B
Bash
Raw Normal View History

2016-06-30 18:41:31 +00:00
#!/bin/sh -e
/init.sh
2016-07-13 03:41:21 +00:00
if ! [[ -c /dev/net/tun ]]
then
mkdir -p /dev/net
mknod /dev/net/tun c 10 200
fi
2016-06-30 18:41:31 +00:00
2016-07-13 03:41:21 +00:00
if [[ $RUNMODE = server ]]
then
iptables -t nat -A POSTROUTING -s ${NETWORK} -o eth0 -j MASQUERADE
fi
2016-06-30 18:41:31 +00:00
exec tincd --no-detach \
--net=${NETNAME} \
--debug=${VERBOSE} \
"$@"