From 2e607720ee739af29fad657db3b37ee22aa5f27b Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 15 Jul 2023 18:23:45 -0500 Subject: [PATCH] Update dsmon.sh --- dsmon.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dsmon.sh b/dsmon.sh index 360e59d..e6708de 100755 --- a/dsmon.sh +++ b/dsmon.sh @@ -302,7 +302,7 @@ GETTSIP(){ if [ ${#TSI} != 0 ]; then TSIP=$(/sbin/ip -o -4 addr list tailscale0 | awk '{print $4}' | cut -d/ -f1) hostname=$(hostname -f) - hostname=${hostname/.scity/.ts.scity} + [ "${hostname}" == "" ] && hostname="$(hostname).ts.scity.us" || hostname=${hostname/.scity/.ts.scity} echo "${hostname}" echo "Tailscale running, TSIP: ${TSIP}" echo -en "Updating DNS ... "