On Tue, Aug 12, 2003 at 11:50:01AM +0200, Dirk Lutzebaeck wrote:
Dennis Stout writes:
On a whim, I would try writing a second script to do the actual shutdown and
restart of Apache.
Then have your mod_perl program either run it in the background (with a ) or
fork it into another
Martin Langhoff writes:
how can I restart the root httpd server from within modperl?
Use `at` to schedule it a minute in the future -- effectively forking it.
Yes, also thought of that but the smallest unit of 'at' is minutes and
I want to restart the server immediately.
Note that
In fact, I'm using 'killall httpd', which effectively kills every httpd
process. The drawback is that you need /proc available and that it may kill
httpd's belonging to another Apache.
But afrer all, you can always write awk script that would parse ps output
and do exactly what you want.
Egor.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Tuesday 12 August 2003 11:50, Dirk Lutzebaeck wrote:
Dennis Stout writes:
On a whim, I would try writing a second script to do the actual shutdown
and restart of Apache.
Then have your mod_perl program either run it in the background
Thanks, I made it a bit more simple:
use POSIX;
if (! fork) { # child
setsid;
POSIX::close(0);
POSIX::close(1);
exec(restart-apache-command);
}
Works great!
Thanks,
Dirk
Torsten Foertsch writes:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Tuesday
Can I call something like a reload of httpd.conf?
This is what sending a SIGHUP to Apache does. However, both mod_perl-enabled
servers I run misbehave on this, so I always do a full restart.
Egor.
how can I restart the root httpd server from within modperl?
Use `at` to schedule it a minute in the future -- effectively forking it.
Note that normally apache starts as root and runs as an unprivileged
user. If this is the case you _can_ achieve it using a suid wrapper or
sudo, but you'll
Why not start the Apache from a shell script that would always start it
again if it dies?
To restart the Apache then, you'd just kill the root httpd with apachectl.
Killing the paernt shell script would terminate the whole operation.
Egor.
-Original Message-
From: Dirk Lutzebaeck
Dennis Stout writes:
On a whim, I would try writing a second script to do the actual shutdown and
restart of Apache.
Then have your mod_perl program either run it in the background (with a ) or
fork it into another process.
Did exactly that but is has the effect that when the parent