Skip to content

Commit

Permalink
Fix serve and funnel commands (tailscale-dev#10)
Browse files Browse the repository at this point in the history
* Fix serve and funnel commands

Updates the serve and funnel commands to the new format used in Tailscale version 1.52.0 and above.

* Run either serve or funnel, not both
  • Loading branch information
timtailscale authored Nov 2, 2023
1 parent df22647 commit fe75ce9
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions root/etc/s6-overlay/s6-rc.d/svc-tailscale-up/run
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,15 @@ fi

tailscale up $FLAGS

# configure serve
# configure serve or funnel
if [ -v TAILSCALE_SERVE_PORT ] && [ -v TAILSCALE_SERVE_MODE ]; then
if [[ $TAILSCALE_SERVE_MODE == "https" ]]; then
tailscale serve "${TAILSCALE_SERVE_MODE}":443 / http://localhost:"${TAILSCALE_SERVE_PORT}"

if [ -v TAILSCALE_FUNNEL ]; then
tailscale funnel --bg --"${TAILSCALE_SERVE_MODE}"=443 http://localhost:"${TAILSCALE_SERVE_PORT}"
else
tailscale serve "${TAILSCALE_SERVE_MODE}":443 http://localhost:"${TAILSCALE_SERVE_PORT}"
tailscale serve --bg --"${TAILSCALE_SERVE_MODE}"=443 http://localhost:"${TAILSCALE_SERVE_PORT}"
fi
fi

# configure funnel
if [ -v TAILSCALE_FUNNEL ]; then
tailscale funnel 443 on

fi


Expand Down

0 comments on commit fe75ce9

Please sign in to comment.