No-IP Dynamic DNS Provider Update script from Owncloud - no client

I am sharing this script I did to update my hosts on

install DNSUtil from my repos

echo "deb wheezy-64k main sid jessie" > /etc/apt/sources.list

apt-get update

apt-get install dnsutils_9.9.5.dfsg-9_armhf.deb libbind9-90_9.9.5.dfsg-9_armhf.deb libdns100_9.9.5.dfsg-9_armhf.deb libisc95_9.9.5.dfsg-9_armhf.deb libisccfg90_9.9.5.dfsg-9_armhf.deb liblwres90_9.9.5.dfsg-9_armhf.deb bind9-host_9.9.5.dfsg-9_armhf.deb host_9.9.5.dfsg-9_all.deb libgeoip1_1.6.2-4_armhf.deb

mkdir -p /shares/scriptsmkdir -p /shares/logs
nano /shares/scripts/

copy and past the following into

* change USERNAME : PASSWORD with your noip username and password

* change HOSTNAME with the name of teh host you want to update or the group you want to update



ip1="$(dig +short"
currentip="$(dig +short HOSTNAME)"
if ["$currentip" == "$ip1"];then
                echo "No update is needed" "$now" >> /shares/logs/noip.log
                echo "$content"
                result="$(curl -s "$content")"
                echo "$result" "$now" >> /shares/logs/noip.log

 Ctrl +x then Y - enter

chmod a+x /shares/scripts/

now set the script to run every 30 Min to check if update is needed by crontab

crontab -e

add the following entry to crontab

30 * * * * sh /shares/scripts/

* the script automatically chick if update is needed it send the update to no-ip if the ip-address has not change then it skip the update

full log can be found in /shares/logs/noip.log


Thank you very much for sharing this script. There are some specific situations that could benefit from this.