Add additional check for https to hook script

This commit is contained in:
Christoph Hummer
2024-10-25 21:34:01 +02:00
committed by GitHub
parent 52901e55be
commit 27eae215d3

View File

@@ -224,8 +224,8 @@ if [ "${EXIT_STATUS}" != "0" ]; then
fi
unset EXIT_STATUS
if [ ! -z "${TAILSCALE_SERVE_PORT}" ] && [ "$(tailscale status --json | jq -r '.CurrentTailnet.MagicDNSEnabled')" = "false" ] ; then
echo "ERROR: Enable HTTPS on your Tailscale account to use Tailscale Serve/Funnel."
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"
error_handler
fi