configure tailscale serve is $TS_SERVE_PORT set

This commit is contained in:
John Bowdre 2023-12-28 13:26:24 -06:00
parent fdd8ef5456
commit 968d1b6ac0

View file

@ -8,5 +8,10 @@ until tailscale up --authkey="${TS_AUTH_KEY}" --hostname="${TS_HOSTNAME}"; do
sleep 0.1 sleep 0.1
done done
tailscale status 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}
wait ${PID} wait ${PID}