#!/usr/bin/env bash if tailscale status --json 2>/dev/null | grep -q '"BackendState": "Running"'; then tailscale down else tailscale up fi