a better apachectl?

a better apachectl?

am 05.06.2009 23:21:08 von Jonathan Swartz

Over the years I've developed (as I'm sure many have :)) a small home-
grown replacement for apachectl, to make start/stop/restart easier.
It's in library form, and among other things it

* detects whether the server is actually running, by contacting the port
* waits to make sure the server starts properly, and shows the error
logs if it fails
* detects and removes out-of-date httpd.pid files

Now's the perfect time to ask, is there something out there like this?
If not, does this seem useful for CPAN, as, say, Server::Control?

Jon

Re: a better apachectl?

am 05.06.2009 23:32:37 von Jonathan Swartz

Since writing this, I found two relevant entries on CPAN:

* App::Control - Same basic idea, but doesn't have the server-specific
features - also not easily subclassable, as all commands are handled
in a giant case statement :)
* Lighttpd::Control - Same basic idea, but just for lighttpd, obviously

I'm guessing that my code, with subclassing, could work equally well
for apache, lighttpd, and HTTP::Server::Simple.

Jon

On Jun 5, 2009, at 2:21 PM, Jonathan Swartz wrote:

> Over the years I've developed (as I'm sure many have :)) a small
> home-grown replacement for apachectl, to make start/stop/restart
> easier. It's in library form, and among other things it
>
> * detects whether the server is actually running, by contacting the
> port
> * waits to make sure the server starts properly, and shows the error
> logs if it fails
> * detects and removes out-of-date httpd.pid files
>
> Now's the perfect time to ask, is there something out there like
> this? If not, does this seem useful for CPAN, as, say,
> Server::Control?
>
> Jon
>

Re: a better apachectl?

am 06.06.2009 00:18:01 von Perrin Harkins

On Fri, Jun 5, 2009 at 5:21 PM, Jonathan Swartz wrote:
> Over the years I've developed (as I'm sure many have :)) a small home-grown
> replacement for apachectl, to make start/stop/restart easier.

I've written a few of those :) Most of mine have too many assumptions
to make them useful for sharing though (e.g. generate httpd.conf from
templates, start both frontend and backend servers, talk to load
balancer). It sounds like your is pretty modular, so I'd say put it
up.

- Perrin

Re: a better apachectl?

am 06.06.2009 00:53:47 von Jonathan Swartz

Yup, I'm trying to figure out a way to integrate generation of conf
files, since that's another common activity, I'm sure.

Ok, I'll put it out there.

Jon

On Jun 5, 2009, at 3:18 PM, Perrin Harkins wrote:

> On Fri, Jun 5, 2009 at 5:21 PM, Jonathan Swartz
> wrote:
>> Over the years I've developed (as I'm sure many have :)) a small
>> home-grown
>> replacement for apachectl, to make start/stop/restart easier.
>
> I've written a few of those :) Most of mine have too many assumptions
> to make them useful for sharing though (e.g. generate httpd.conf from
> templates, start both frontend and backend servers, talk to load
> balancer). It sounds like your is pretty modular, so I'd say put it
> up.
>
> - Perrin