[oclug]Perl Qs
Jon Earle
je_linux at kronos.honk.org
Wed Jan 15 12:40:22 EST 2003
On Wed, 15 Jan 2003, Joe Burpee wrote:
> On Wed, Jan 15, 2003 at 10:27:16AM -0500, Jon Earle wrote:
> > 1. I have a script run by my webserver (not under mod_perl) that needs to
> > restart networking and the webserver. If I shutdown the server though,
> > the script is terminated. I've thought about scheduling a cron job, but
> > then I'd just have to delete it somehow, and this should be fairly idiot
> > proof.
>
> Not sure why you have to delete it. The cron job could just check
> whether the server is running. E.g. on RedHat
Well, it will only run once in a while (ie: when the network configuration
changes, which is usually not often).
I found though, that 'kill -HUP <pid of apache process>' does what I need.
The perl cgi script runs, and apart from the browser waiting for some
terminating character (I send a warning to the user, and the last chars
sent are "...</html>\n") from the server's previous configuration, it's
working as expected.
So, that begs the next question... what is sent by the server to a client
after '</html>' to tell the browser to stop expecting more data?
> $oldip = quotemeta "CGI=HASH(0x86e5a60)->param('ip')";
Ah, that should do it. Thanks Joe!
Cheers!
Jon
---
Jon Earle
SAVE FARSCAPE http://www.savefarscape.com/
Q: Could your economic future be negatively affected by Canada's
ratification of Kyoto?
More information about the OCLUG
mailing list