From 90b052c8e2c183d5ec5ea88ff4221fcd6c4f8973 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 15 Jul 2023 18:17:15 -0500 Subject: [PATCH] Update dsmon.sh --- dsmon.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/dsmon.sh b/dsmon.sh index 134bc3e..f735efd 100755 --- a/dsmon.sh +++ b/dsmon.sh @@ -297,6 +297,20 @@ RUNCMD(){ echo } +GETTSIP(){ + TSI=$(/sbin/ip link | grep tailscale0) + if [ ${#TSI} != 0 ]; then + TSIP=$(/sbin/ip -o -4 addr list tailscale0 | awk '{print $4}' | cut -d/ -f1) + echo "$(hostname) - $(hostname -f) - $(hostname -a)" + echo "Tailscale running, TSIP: ${TSIP}" + echo -en "Updating DNS ... " + # /usr/bin/curl "https://systems:Dcs9613@dns.scity.us/nic/update?hostname=backup.ts.scity.us&myip=${TSIP}" >/dev/null 2>&1 + echo "Done" + else + echo "Not running Tailscale" + fi +} + GETCRONTABS(){ start=`date +%s`