Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions share/docker/tailscale_container_hook
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,13 @@ while true; do
sleep 2
done

# Clear persisted Serve/Funnel state before applying the current template mode.
# Without this, switching the template from Funnel/Serve to No leaves the old
# config active in the existing Tailscale state directory after restart.
echo "Resetting Tailscale Serve/Funnel configuration"
tailscale funnel reset >/dev/null 2>&1 || true
tailscale serve reset >/dev/null 2>&1 || true

if [ ! -z "${TAILSCALE_SERVE_PORT}" ] && [ "$(tailscale status --json | jq -r '.CurrentTailnet.MagicDNSEnabled')" != "false" ] && [ -z "$(tailscale status --json | jq -r '.Self.Capabilities[] | select(. == "https")')" ]; then
echo "ERROR: Enable MagicDNS and HTTPS on your Tailscale account to use Tailscale Serve/Funnel."
echo "See: https://tailscale.com/kb/1153/enabling-https"
Expand Down
Loading