diff --git a/containers/mikrotik-tailscale/start-tailscale.sh b/containers/mikrotik-tailscale/start-tailscale.sh index 81ef3ce..6d3dc05 100644 --- a/containers/mikrotik-tailscale/start-tailscale.sh +++ b/containers/mikrotik-tailscale/start-tailscale.sh @@ -25,11 +25,22 @@ esac # Initialize and start Tailscale tailscaled > /dev/null 2>&1 & sleep 5 -tailscale up ${up} +if [ -n "${up}" ]; then + tailscale up ${up} +fi if [ -n "${set}" ]; then tailscale set ${set} fi +if [ -z "${up}" ] && [ -z "${set}" ] && [ -z "${nat}" ]; then + echo "No 'up' or 'set' options provided" + echo "Use /container/shell CONTAINER to access the shell of this container" + echo "I hope you use a mountpoint for /var/lib/tailscale for persistence" + echo "Uncomment the line below to run iptables -t nat -A POSTROUTING -o tailscale0 -j MASQUERADE if you need NAT" + # iptables -t nat -A POSTROUTING -o tailscale0 -j MASQUERADE +fi + + while true; do tailscale netcheck sleep 600