Malcolm, Thanks very much indeed - makes sense to me too!!
It logs me in with my username and password to opendns so I can take advantage of the facilities that the account offers, over and above simply using the open dns facility - url filtering for nasties is the main one!
Ed Malcolm Hunter wrote:
Hi Ed, On Sat, June 7, 2008 8:25 pm, Edward Kerr wrote:Hello all, I am about to include about this script in my /etc/rc.local file It logs me in to OpenDNS Before I bore you with the script - which I found on the web - my question is: How can I get it to produce an output in a log / text file so I can see what it did and if it was successful? Here is the script: UNAME=xxx # username PWORD=xxx # password (plaintext, sorry!) TEMP=/tmp/tmp.ddns # temporary file ERROR=5 # times to retry trap cleanup 1 2 3 6 cleanup() { rm $TEMP exit 1 } update() { wget --quiet --no-check-certificate -O $TEMP 'http://'$UNAME':'$PWORD'@updates.dnsomatic.com/nic/update?' if [ `cat $TEMP | grep -c good` = 1 ] then logger OpenDNS updated successfully else while [ $ERROR -gt 0 ]; do ERROR=$(($ERROR-1)) sleep 10s update done logger OpenDNS update failed fi } update rm $TEMP exit 0 I have tried to find a file called /tmp/tmp.ddns after running the script, but it is not there!Comment out the 'rm $TEMP' line and you will be able to find it. Is this to keep your dynamic DNS address updated? Malc
_______________________________________________ Peterboro mailing list [email protected] https://mailman.lug.org.uk/mailman/listinfo/peterboro
