On Sun, 12 Feb 2006 15:02:38 +0800 Ken Perl <[EMAIL PROTECTED]> wrote:
> >From the Apache2::ServerUtil API doc, to do something only when > >server > restarts (httpd -k start or httpd -k graceful), check whether > restart_count() is bigger than 1: > > my $cnt = Apache2::ServerUtil::restart_count(); > do_something() if $cnt > 1; > > However, the API doesn't work as above. > > [...snip...] > > But, I can't detecting start, stop, graceful in startup.pl coding just > like in the API doc, Could you give me some comments? thanks. I think you are misreading what the docs are saying. Apache2::ServerUtil::restart_count() is just that a count of the number of times the server was restarted. So a start will show a count of two and gracefuls would be greater than two. The server restarts itself at least once during start up and you typically do not want to do anything during that initial restart. --------------------------------- Frank Wiles <[EMAIL PROTECTED]> http://www.wiles.org ---------------------------------