diff --git a/images/tailscale/start.sh b/images/tailscale/start.sh index 8438b46..8847efb 100644 --- a/images/tailscale/start.sh +++ b/images/tailscale/start.sh @@ -8,5 +8,10 @@ until tailscale up --authkey="${TS_AUTH_KEY}" --hostname="${TS_HOSTNAME}"; do sleep 0.1 done tailscale status +if [ -n "${TS_SERVE_PORT}" ]; then + if ! tailscale serve status | grep -q "${TS_SERVE_PORT}"; then + tailscale serve --bg "${TS_SERVE_PORT}" + fi +fi wait ${PID} wait ${PID}