I add your code to my startup.pl, but it doesn't work. # apache2ctl -k start Program is starting Stopping...
#apache2ctl -k graceful <no output here> # apache2ctl -k stop <no output here> On 2/13/06, Frank Wiles <[EMAIL PROTECTED]> wrote: > On Mon, 13 Feb 2006 09:17:57 +0800 > Ken Perl <[EMAIL PROTECTED]> wrote: > > > No, I want to do something in the startup.pl script. > > When apache start, I also want to say my modperl program is starting > > and started, when stop, I want to say my modperl program is stopping > > and stopped. When graceful, I want to say reloading and reloaded. > > But I didn't find a API could help, any ideas? > > Hi Ken, > > I haven't tested this, but it should work. In your startup.pl do > something like this: > > my $started = 0; > my $cnt = Apache2::ServerUtil::restart_count(); > > if( !$started and $cnt == 1 ) { > $started = 1; > print "Program is starting\n"; > } > > if( $cnt > 2 ) { > print "Restarting"; > } > > if( $started and $cnt == 1 ) { > print "Stopping..."; > } > > --------------------------------- > Frank Wiles <[EMAIL PROTECTED]> > http://www.wiles.org > --------------------------------- > > -- perl -e 'print unpack(u,"62V5N\"FME;G\!E<FQ`9VUA:6PN8V]M\"[EMAIL PROTECTED] ")'