#! /bin/sh 

#

# This script update your dinamic ip in Zoneedit

# Execute this script in a cron job each 15 or 10 minutes…

# ( whatismyip.org ban people for more to 3 request in 10 minutes )

# crontab -e

# */15 * * * * /your/script/path/update_host.sh

#

# comments? mail me to : Richzendy@gmail.com

###############################################

 

USER=”your zoneedit user”

PASSWD=”your zoneedit password”

DOMAIN=”your wanna update this domain name in zoneedit”

# path for save your ip’s data base ( edit is variable… )

DB_PATH_FILE=”/var/log/ip_DB”

# Search your actual ip

IP_NEW=`curl -s http://www.whatismyip.org/`

# you need permissions over this file

IP_OLD=`tail -n 1 $DB_PATH_FILE`

 

if [ $IP_NEW == $IP_OLD ] ; then

exit 0

else

# update your host

/usr/bin/wget -O – –http-user=$USER –http-passwd=$PASSWD “http://dynamic.zoneedit.com/auth/dynamic.html?host=$DOMAIN” &> /dev/null

echo $IP_NEW >> $DB_PATH_FILE

fi

 

 

Grabalo como, update_host.sh y dale permisos de ejecución, Alguna sugerencia? colocala en los comentarios :-/

No hay articulos relacionados a esta entrada.