tailscale.sh aktualisiert
This commit is contained in:
13
tailscale.sh
13
tailscale.sh
@@ -25,8 +25,7 @@ if [[ ! -f /usr/bin/tailscale || ! -f /usr/bin/tailscaled ]]; then
|
||||
if [ ! -z "${TAILSCALE_EXIT_NODE_IP}" ]; then
|
||||
if [ ! -c /dev/net/tun ]; then
|
||||
echo "ERROR: Device /dev/net/tun not found!"
|
||||
echo " Make sure to pass through /dev/net/tun to the container and add the"
|
||||
echo " parameter --cap-add=NET_ADMIN to the Extra Parameters!"
|
||||
echo " Make sure to pass through /dev/net/tun to the container."
|
||||
exit 1
|
||||
fi
|
||||
APT_IPTABLES="iptables "
|
||||
@@ -37,6 +36,14 @@ if [[ ! -f /usr/bin/tailscale || ! -f /usr/bin/tailscaled ]]; then
|
||||
apt-get -y install --no-install-recommends jq wget ${APT_IPTABLES}>/dev/null 2>&1
|
||||
echo "Done"
|
||||
|
||||
if [ "${APT_IPTABLES}" == "iptables " ]; then
|
||||
if ! iptables -L >/dev/null 2>&1; then
|
||||
echo "ERROR: Cap: NET_ADMIN not available!"
|
||||
echo " Make sure to add --cap-add=NET_ADMIN to the Extra Parameters"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Tailscale not found, downloading..."
|
||||
echo "Please wait..."
|
||||
|
||||
@@ -181,4 +188,4 @@ if [ ! -z ${TAILSCALE_SERVE_PORT} ]; then
|
||||
echo "Enabling Serve! See https://tailscale.com/kb/1312/serve"
|
||||
eval tailscale serve --bg --"${TAILSCALE_SERVE_MODE}"=443${TAILSCALE_SERVE_PATH} http://localhost:"${TAILSCALE_SERVE_PORT}${TAILSCALE_SERVER_LOCALPATH}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
Reference in New Issue
Block a user