diff --git a/tailscale/rootfs/etc/s6-overlay/s6-rc.d/post-tailscaled/run b/tailscale/rootfs/etc/s6-overlay/s6-rc.d/post-tailscaled/run index db8ceb05..fe0594bc 100755 --- a/tailscale/rootfs/etc/s6-overlay/s6-rc.d/post-tailscaled/run +++ b/tailscale/rootfs/etc/s6-overlay/s6-rc.d/post-tailscaled/run @@ -10,6 +10,7 @@ declare -a routes=() declare ipinfo declare login_server declare tags +declare keyexpiry function appendarray() { local -n array=${1} @@ -105,4 +106,11 @@ do sleep 2 done +# Warn about key expiration +if keyexpiry=$(/opt/tailscale status --self=true --peers=false --json | jq -rce '.Self.KeyExpiry'); then + bashio::log.warning "The connection's key will expire on: ${keyexpiry}" + bashio::log.warning "Consider disabling key expiry to avoid losing connection to your Home Assistant device." + bashio::log.warning "Please check your configuration based on the add-on's documentation under \"Configuration\"" +fi + bashio::log.info "Tailscale is running"