if ["$OLDIP" == "$MYIP"]; then echo"Nothing happened." exit 0 fi echo"$MYIP" > /home/root/iprecord.txt echo"IP has changed."
# Fetch DNS record ID RESPONSE="$(curl -s "https://www.namesilo.com/api/dnsListRecords?version=1&type=xml&key=$MYAPIKEY&domain=$MYDOMAIN")" RECORD_ID="$(echo $RESPONSE | sed -n 's/^.*<record_id>\(.*\)<\/record_id><type>A<\/type><host>'$MYFULLDOMAIN'<\/host>.*$/\1/p')"