Date: Fri, 9 Jul 1999 12:20:27 nzst From: "Dan Langille" <dan.langille@dvl-software.com> To: Dan Nelson <dnelson@emsphone.com>, Dan Langille <dan.langille@dvl-software.com> Cc: questions@FreeBSD.ORG Subject: Re: lynx from /etc/crontab fails Message-ID: <3785404b.55b8.0@actrix.gen.nz>
next in thread | raw e-mail | index | archive | help
Dan Nelson wrote: >In the last episode (Jul 09), Dan Langille said: >> I'm trying to execute a shell script from a cron job. The script >> runs fine when launched manually, but when launched from a cron job I >> get the following: >> >> lynx: Can't access startfile http://www.yi.org/bin/dyndns.fcgi?ipaddr= >> >> Any ideas why lynx has this problem only under these circumstances? > >Try ktracing it? Do you set any variables in your shell startup >scripts that might affect lynx's behaviour? I haven't tried ktracing it (first I've heard of ktracing). Here is the script: $ cat dns_update.sh #!/bin/sh user_id="something" 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` lynx -source -auth=$user_id:$password \ http://www.yi.org/bin/dyndns.fcgi?ipaddr=$ip_addr | \ sed -e "s,^,$now: ," -e "s,<.*\?>,,g" So yes, some variables are set, but this shouldn't affect lynx would it? >Also consider using fetch, which was designed to be used in >non-interactive places like cron scripts. I don't know how/if fetch can be used in this instance. - Dan Langille 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?3785404b.55b8.0>