From 968d1b6ac055871d4cc3ef099e0d3d34de8b84fb Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Thu, 28 Dec 2023 13:26:24 -0600 Subject: [PATCH] configure tailscale serve is $TS_SERVE_PORT set --- images/tailscale/start.sh | 5 +++++ 1 file changed, 5 insertions(+) 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}