detect changed WAN ip address

  • I am trying to emulate dyndns
    my son has a dreambox - remote from me - which I want to administer
    his router can only deal with a dyndns.org account
    dyndns now charge $20 a year for a domain name of n.dyndns.org
    so - I thought it would be easy to write a script


    the script should read a file from the hard disk, which contains the old wan ip address
    get the new ip address from the automation web site
    compare the two - if different, save the new ip address and then scp the file to my dreambox
    sounded easy.


    first off - created the text file with

    Code
    touch /media/hdd/my_ip.txt


    then got the current ip address and wrote it to the file

    Code
    WANIP=`wget -q --output-document=- "http://automation.whatismyip.com/n09230945.asp"`
    echo $WANIP > /media/hdd/my_ip.txt


    now the script file - having problems with this!



    I get an error [3.4.5.6: not found (address changed for demonstration purposes)

  • thanks -I had changed the <> for !=
    but I wasn't aware of the spaces


    thanks again