Skip to content

Commit 1f37e1e

Browse files
authored
Merge pull request #2616 from unraid/codex/7.2-tailscale-funnel-reset
fix: reset Tailscale Funnel state on 7.2 restarts
2 parents 9294349 + fdebbb2 commit 1f37e1e

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

share/docker/tailscale_container_hook

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,13 @@ while true; do
298298
sleep 2
299299
done
300300

301+
# Clear persisted Serve/Funnel state before applying the current template mode.
302+
# Without this, switching the template from Funnel/Serve to No leaves the old
303+
# config active in the existing Tailscale state directory after restart.
304+
echo "Resetting Tailscale Serve/Funnel configuration"
305+
tailscale funnel reset >/dev/null 2>&1 || true
306+
tailscale serve reset >/dev/null 2>&1 || true
307+
301308
if [ ! -z "${TAILSCALE_SERVE_PORT}" ] && [ "$(tailscale status --json | jq -r '.CurrentTailnet.MagicDNSEnabled')" != "false" ] && [ -z "$(tailscale status --json | jq -r '.Self.Capabilities[] | select(. == "https")')" ]; then
302309
echo "ERROR: Enable MagicDNS and HTTPS on your Tailscale account to use Tailscale Serve/Funnel."
303310
echo "See: https://tailscale.com/kb/1153/enabling-https"

0 commit comments

Comments
 (0)