Update dsmon.sh
This commit is contained in:
6
dsmon.sh
6
dsmon.sh
@@ -301,11 +301,11 @@ GETTSIP(){
|
|||||||
TSI=$(/sbin/ip link | grep tailscale0)
|
TSI=$(/sbin/ip link | grep tailscale0)
|
||||||
if [ ${#TSI} != 0 ]; then
|
if [ ${#TSI} != 0 ]; then
|
||||||
TSIP=$(/sbin/ip -o -4 addr list tailscale0 | awk '{print $4}' | cut -d/ -f1)
|
TSIP=$(/sbin/ip -o -4 addr list tailscale0 | awk '{print $4}' | cut -d/ -f1)
|
||||||
hostname=$(hostname -f)
|
hostname=$(hostname -f); hostname=${hostname,,}
|
||||||
([ "${hostname}" == "" ] || [[ "${hostname}" != *".scity"* ]]) && hostname=$(hostname -f) && hostname="${hostname,,}.ts.scity.us" || hostname=${hostname,,/.scity/.ts.scity}
|
([ "${hostname}" == "" ] || [[ "${hostname}" != *".scity"* ]]) && hostname=$(hostname) && hostname="${hostname,,}.ts.scity.us" || hostname=${hostname/.scity/.ts.scity}
|
||||||
echo "${hostname,,}"
|
echo "${hostname,,}"
|
||||||
echo "Tailscale running, TSIP: ${TSIP}"
|
echo "Tailscale running, TSIP: ${TSIP}"
|
||||||
echo -en "Updating DNS ... "
|
echo -en "Updating DNS for '${hostname}' ... "
|
||||||
# /usr/bin/curl "https://systems:Dcs9613@dns.scity.us/nic/update?hostname=backup.ts.scity.us&myip=${TSIP}" >/dev/null 2>&1
|
# /usr/bin/curl "https://systems:Dcs9613@dns.scity.us/nic/update?hostname=backup.ts.scity.us&myip=${TSIP}" >/dev/null 2>&1
|
||||||
echo "Done"
|
echo "Done"
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user