weird wget/curl problems
Collins Richey
crichey
Fri Aug 11 20:33:03 PDT 2006
On 8/11/06, Net Llama! <netllama at linux-sxs.org> wrote:
> On Fri, 11 Aug 2006, Collins Richey wrote:
> > On 8/11/06, Net Llama! <netllama at linux-sxs.org> wrote:
> >> I use freedns.afraid.org for providing a static domain name for the
> >> dynamic IP of my home DSL connection. I've had this bizarre problem for a
> >> few weeks now, where hitting the URL which updates the IP assigned to my
> >> domain name fails with both wget & curl when run from a cronjob. Yet, if
> >> I run it again manually, it works.
> >>
> >
> >> I can't figure out why its doing this at all. Anyone have any ideas why
> >> wget & curl wouldn't work via a cronjob?
> >>
> >
> > With cron jobs that work correctly when run standalone, it's usually
> > (almost always) the path or the environment that is different. Is this
> > a script or just a bare command? If the latter, try imbedding it in a
> > script. Does the cron job use an absolute path? If not, try that. Does
> > the command depend on some (hopefully documented) shell environment
> > variable?
>
> Its embedded in a bash script which includes the logic to check whether
> the IP address has changed. The command is nothing more than:
> /usr/bin/curl $url
>
> I've also tried :
> /usr/bin/wget $url
>
Try echoing the envi[ronment] to a file just before invoking the
command and compare the differences?
--
Collins Richey
If you fill your heart with regrets of yesterday and the worries
of tomorrow, you have no today to be thankful for.
More information about the Linux-users
mailing list