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 account
    dyndns now charge $20 a year for a domain name of
    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

    touch /media/hdd/my_ip.txt

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

    WANIP=`wget -q --output-document=- ""`
    echo $WANIP > /media/hdd/my_ip.txt

    now the script file - having problems with this!

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

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

    thanks again