Add a quick script to get the IP address of Phaenna
- ID
a91d57a- date
2024-12-26 22:13:31+00:00- author
Alex Chan <alex@alexwlchan.net>- parent
45c5b68- message
Add a quick script to get the IP address of Phaenna- changed files
1 file, 9 additions
Changed files
web/get_phaenna_ip (0) → web/get_phaenna_ip (299)
diff --git a/web/get_phaenna_ip b/web/get_phaenna_ip
new file mode 100755
index 0000000..8745076
--- /dev/null
+++ b/web/get_phaenna_ip
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+# Get the IP address of Phaenna (my home desktop) within my Tailnet.
+# See https://alexwlchan.net/til/2024/get-tailscale-ip/
+
+set -o errexit
+set -o nounset
+
+tailscale status --json \
+ | jq --join-output --raw-output '.Peer[] | select(.HostName == "Phaenna") | .TailscaleIPs[0]'
\ No newline at end of file