Date: Tue, 6 Jul 1999 10:11:28 +1200 From: "Dan Langille" <dan.langille@dvl-software.com> To: Anton Berezin <tobez@plab.ku.dk> Cc: Burke Gallagher <burke@mcs.net>, freebsd-questions@FreeBSD.ORG Subject: Re: running frequent cron perl scripts Message-ID: <199907052211.RAA09963@metis.host4u.net> In-Reply-To: <19990705232139.D8704@lion.plab.ku.dk> References: <19990705203750.BEYX282564.mta1-rme@wocker>; from Dan Langille on Tue, Jul 06, 1999 at 08:34:27AM %2B1200
next in thread | previous in thread | raw e-mail | index | archive | help
On 5 Jul 99, at 23:21, Anton Berezin wrote: > > ## set the following to the name of a program you want run if its a new > > ## IP > > $RunIfNew = "/home/dan/dns_update.sh"; > > Fine, unless you wish to do it in Perl, directly. It should not be > *that* difficult. Well, the above mentioned script (dns_update.sh) runs fine from the command line, but when launched from with perl, I get this email message: lynx: Can't access startfile http://www.yi.org/bin/dyndns.fcgi?ipaddr= Tue Jul 6 10:03:46 NZST 1999: Tue Jul 6 10:03:46 NZST 1999: Exiting via interrupt: 15 That script is provided by yi.org and I've modified it to include the full path to lynx after previous complaints from cron. $ cat dns_update.sh #!/bin/sh user_id="nottelling" password="secret" ip_addr=`netstat -rn | egrep ^0.0.0.0 | sed -e "s,.* ,,g" | \ xargs /sbin/ifconfig | grep "inet.addr" | sed -e "s,.*addr:,," \ -e "s, .*,,"` now=`date` /usr/local/bin/lynx -source -auth=$user_id:$password \ http://www.yi.org/bin/dyndns.fcgi?ipaddr=$ip_addr | \ sed -e "s,^,$now: ," -e "s,<.*\?>,,g" -- Dan Langille - DVL Software Limited The FreeBSD Diary - http://www.FreeBSDDiary.org/freebsd/ NZ FreeBSD User Group - http://www.nzfug.nz.freebsd.org/ The Racing System - http://www.racingsystem.com/racingsystem.htm To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907052211.RAA09963>