Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: azche24 on May 20, 2004, 06:42:04 PM
-
Hi folks,
i am using a german dyndns Provider DNS-Team. The IP get's updated by doing a Lynx call via shell script:
lynx -cookies -source "http://dnsteam.de/dyndnsupdate.php?login=LOGIN-NAME&password=PASSWORD&domain=DOMAIN" -dump
I call this script via a modified dyndns.org script in /etc/sbin/e-smith/dynamic-dns .
So far so good. But if i replace the cleartext variables as stated above by using the $USERID and such variables given by e-smith, i get back errors.
Obviously the $VARIABLES from the config-manager are not translated properly?
grep DynDNS /home/e-smith/configuration shows everything ok.
So what? Why does lynx not recognize the variables?
:-?
-
It would help if you post the entire content of your scripts. Just copy and past them between code tags so they look like this
sample script
-
OK, sorry!
It would help if you post the entire content of your scripts.
Here she comes :roll:
#!/bin/sh
# DNS-Update @ DNSTEAM
#------------------------------------------------------------
# Custom dynamic DNS update handler.
#------------------------------------------------------------
IPADDR=$1
USERID=$2
PASSWD=$3
DOMAIN=$4
#------------------------------------------------------------
# Your handler starts here.
#------------------------------------------------------------
#lynx -cookies -source "http://dnsteam.de/dyndnsupdate.php?login=$2&password=$3&domain=$4" -dump
lynx -cookies -source "http://dnsteam.de/dyndnsupdate.php?login=LOGIN&password=PASSWORD&domain=DOMAIN.DE" -dump
#------------------------------------------------------------
# Your handler ends here.
#------------------------------------------------------------
exit 0
This is it.
-
Try it this way
#------------------------------------------------------------
# Custom dynamic DNS update handler.
#------------------------------------------------------------
IPADDR=$1
USERID=$2
PASSWD=$3
DOMAIN=$4
#------------------------------------------------------------
# Your handler starts here.
#------------------------------------------------------------
lynx -cookies -source "http://dnsteam.de/dyndnsupdate.php?login=$USERID&password=$PASSWD&domain=$DOMAIN" -dump
#------------------------------------------------------------
# Your handler ends here.
#------------------------------------------------------------
exit 0
-
Hi Bob,
Try it this way
..
lynx -cookies -source "http://dnsteam.de/dyndnsupdate.php?login=$USERID&password=$PASSWD&domain=$DOMAIN" -dump
...
I did that. Provider says: USERDATA notin order...
If i put the same values cleartext into that line, everything is o.k. :oops:
-
I did that. Provider says: USERDATA notin order...
If i put the same values cleartext into that line, everything is o.k. :oops:
All I can say is there must be something wrong in the configuration data. I've written a custom dynamic dns script for ZoneEdit using very similar code and it works fine.
Try dumping parameters to the messages log from within the script using 'logger', e.g.:
logger -t DNS-Team "USER=[$USER] PASSWD=[$PASSWD]"
(The brackets will help you see if there's any rogue white-space).
-
(The brackets will help you see if there's any rogue white-space).
Space between [] is empty. :-(
-
Space between [] is empty. :-(
I just noticed in your original post you said:
I call this script via a modified dyndns.org script in /etc/sbin/e-smith/dynamic-dns
Does this mean this code is in a separate script from dyndns.org? If so then I suspect you are not passing the parameters along.
E.g. if your new script is called "dnsteam", then you've modified dyndns.org with something like:
/etc/sbin/e-smith/dynamic-dns/dnsteam
If so you need to write:
/etc/sbin/e-smith/dynamic-dns/dnsteam $@
The "$@" will pass the $1,$2 etc. parameters along to the new script.
Or simpler just replace the file dyndns.org with your new script!
HTH
-
Or simpler just replace the file dyndns.org with your new script!
HTH
I did that. I replaced the original dyndns.org with my improper lines :-(
-
Well I'm stumped! The script is called from /etc/e-smith/events/ip-change/S85update-dns, and that just passes parameters that it reads from the configuration file.
Running '/sbin/e-smith/db configuration show DynDNS' should give something like:
DynDNS=service
Account=xxx
Password=xxx
Service=dyndns.org
status=enabled
If that's all in place then it's a mystery as to why it doesn't work properly :-( (but at least you've got a work-round)
Sorry, I'm out of ideas...