Hello, I have been struggling to configure ddclient for the last week. Could some one help me for my requirement of just getting the current DNS IP address from my router and writing it to a text file.
I was able to figure out how to reach my router's page and fetch the IP address, however, I was unable to figure out the variable in which the fetched IP address was stored. (I do not know PERL at all, though the perl -d helped in getting a peek into the flow.) I read in a thread "Run program via ddclient using discovered IP" that you could use a script in the postscript= command.
Based on the comments in the above thread, I wrote this wrapper script.
logger -t MyScript Update $1
echo $1 > /home/xxxxxxxx/Desktop/FoundIP.txt
The command ddclient -query returns the correct IP address from the router.
Could anyone help me to just read the IP address from the router and write it to a file on the desktop?
Postscript is only run when ddclient successful updated your dns provider so you can't use ddclient for what you want to do, unless you modify the code. Keep in mind that ddclient has GPL license.
Thank you for the prompt reply.
Understood about the Postscript. I do have a DynDNS account. DDClient does not update the same. The cache file is not written.
Did you tried to run `ddclient -daemon=0 -debug -verbose -noquiet`? It is a big help to debug what goes wrong. You can post the result on http://ddclient.pastebin.ca if you don't see what goes wrong. Put a link here as a reference.