Update nodemgmt-scripts.sh

This commit is contained in:
2023-06-30 18:24:12 -05:00
parent 991384626f
commit 9f98486a89

View File

@@ -1006,12 +1006,12 @@ UPDATE_DYNDNS(){
OLDIP=`dig +short offsite.scity.us @ns1.scity.us`
fi
if [ "${2}" != 'q' ]; then
echo -e "${idsCL[Green]}${OLDIP}"
echo -e "${idsCL[LightCyan]}${OLDIP}"
echo -en "${idsCL[LightCyan]}New IP ${idsCL[White]}: "
fi
NEWIP=`dig +short myip.opendns.com @resolver1.opendns.com`
if [ "${2}" != 'q' ]; then
echo -e "${idsCL[LightCyan]}${NEWIP}"
echo -e "${idsCL[Green]}${NEWIP}"
fi
if ([ "${OLDIP}" != "" ] && [ "${NEWIP}" != "" ] && [[ "${NEWIP}" != *";"* ]] && [ "${OLDIP}" != "${NEWIP}" ]) || [ "${2}" == "force" ]; then