Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Jul 1999 15:21:54 nzst
From:      "Dan Langille" <dan.langille@dvl-software.com>
To:        Burke Gallagher <burke@mcs.net>
Cc:        Anton Berezin <tobez@plab.ku.dk>, freebsd-questions@FreeBSD.org
Subject:   Re: running frequent cron perl scripts
Message-ID:  <37817652.94.0@actrix.gen.nz>

next in thread | raw e-mail | index | archive | help
>Here is the script i just debugged using my apache server (I don't have a
>Nokia M10).

<grin>

Thanks.  I made the changes to my code as you suggested and it worked!  And
it *is* much faster.  There seems to be quite a bit of overhead in loading perl,
but after that it seems quite fast.  It's hard to tell at the moment because
of telnet lag, but when I get home tonight I'll have a close look at times.


Here's the output from the script:

$ perl get_ip.sh
DYNDNS
DYNDNS start
DYNDNS 2nd
DYNDNS 3rd GET /shell/show+ip+interfaces 1.1
Accept: text/*, text/html
Authorization: Basic MadeHardBy:Telecom


DYNDNS 4th
DYNDNS 5th
DYNDNS 6th
DYNDNS 7th
DYNDNS 8th
DYNDNS loop
DYNDNS loop
DYNDNS loop
DYNDNS loop
DYNDNS 9th
DYNDNS 10th
currentIP = ,  lastIP = 0.55.152.24
change detected
  ^
  |
then it ran the yi.org update script.

Note it didn't print the currentIP.  Ignore the last IP.  I manually modified
the file contents to force an update.

FWIW: Here's the log:

Jul  6 15:09:43 ns DYNDNS[57193]: start
Jul  6 15:10:07 ns The[57210]: IP Address has changed to
Jul  6 15:10:07 ns DYNDNS[57211]: stopped

Note that:    

syslog( "The IP Address has changed to $currentIP" );

does not actually print the IP.  I had this problem with my original script
and don't know how to fix it.

I am impressed.  Very impressed.
-
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?37817652.94.0>