Hi.
I have strange situation with OpenDNS update script.
It is looks like this:
When I run this script manually it is working fine, in system log I got something like:Code:#!/bin/sh TEMP=pliktemp trap cleanup 1 2 3 6 cleanup() { rm $TEMP exit 1 } update() { /opt/bin/curl -o $TEMP -u user:password https://updates.opendns.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
But when I put this script in cron "cron.hourly" directory, after execution in system log i got:Code:Sep 30 16:11:46 admin: OpenDNS updated successfully
What is wrong?Code:Sep 30 16:01:33 admin: OpenDNS update failed
Please give some help![]()


Reply With Quote