update
This commit is contained in:
@@ -108,9 +108,9 @@ if [ -f ${NM_FOLDER}/defaults.local.inc ]; then
|
||||
|
||||
fi
|
||||
|
||||
TSI=$(/sbin/ip link | grep tailscale0)
|
||||
[ ${#TSI} != 0 ] && RUN_NODE_TSIP=$(/sbin/ip -o -4 addr list tailscale0 | awk '{print $4}' | cut -d/ -f1) || RUN_NODE_TSIP=
|
||||
TSI=$(/sbin/ip link | grep tailscale0) && [ ${#TSI} != 0 ] && RUN_NODE_TSIP=$(/sbin/ip -o -4 addr list tailscale0 | awk '{print $4}' | cut -d/ -f1) || RUN_NODE_TSIP=
|
||||
RNIP=$(ip addr show $(ip route | awk '/default/ { print $5 }') | grep "inet" | head -n 1 | awk '/inet/ {print $2}' | cut -d'/' -f1)
|
||||
|
||||
for NTYPE in "${NM_NODE_TYPES[@]}"; do
|
||||
var=${NTYPE}_HOSTS[@]
|
||||
RUN_NODE_TYPE=""
|
||||
|
||||
@@ -534,11 +534,8 @@ UPDATE_DYNDNS(){
|
||||
/usr/bin/curl -s "https://systems:Dcs9613@wdns.scity.us/nic/update?hostname=offsite.scity.us&myip=${NEWIP}" > /dev/null 2>&1
|
||||
/usr/bin/curl -s "https://systems:Dcs9613@wdns.scity.us/nic/update?hostname=backup.scity.us&myip=${NEWIP}" > /dev/null 2>&1
|
||||
|
||||
L_OLDIP=`dig +short offsite.scity.us @10.10.10.5 +time=2`
|
||||
if ([ "${L_OLDIP}" != "" ] && [[ "${L_OLDIP}" != *";"* ]] && [ "${L_OLDIP}" != "${NEWIP}" ]) || [ "${2}" == "force" ]; then
|
||||
/usr/bin/curl -s "https://systems:Dcs9613@dns.scity.us/nic/update?hostname=offsite.scity.us&myip=${NEWIP}" > /dev/null 2>&1
|
||||
/usr/bin/curl -s "https://systems:Dcs9613@dns.scity.us/nic/update?hostname=backup.scity.us&myip=${NEWIP}" > /dev/null 2>&1
|
||||
fi
|
||||
/usr/bin/curl -s "https://systems:Dcs9613@dns.scity.us/nic/update?hostname=offsite.scity.us&myip=${NEWIP}" > /dev/null 2>&1
|
||||
/usr/bin/curl -s "https://systems:Dcs9613@dns.scity.us/nic/update?hostname=backup.scity.us&myip=${NEWIP}" > /dev/null 2>&1
|
||||
|
||||
fi
|
||||
SENDNOTICE "${1^^} DYNDNS Updated" "Updated ${1^} WAN IP from '${OLDIP}' to '${NEWIP}'"
|
||||
|
||||
Reference in New Issue
Block a user