App::Control::Apache - App::Control subclass for apache


RunApp documentation Contained in the RunApp distribution.

Index


Code Index:

NAME

Top

App::Control::Apache - App::Control subclass for apache

SYNOPSIS

Top

 see App::Control

DESCRIPTION

Top

The class implements additional methods for App::Control to emulate apachectl.

configtest
graceful

SEE ALSO

Top

App::Control

AUTHORS

Top

Chia-liang Kao <clkao@clkao.org>

COPYRIGHT

Top


RunApp documentation Contained in the RunApp distribution.

#!/usr/bin/perl -w
use strict;

package App::Control::Apache;
use base qw(App::Control);

sub graceful {
    my $self = shift;
    die $self->status unless $self->running;
    if (kill ('USR1', $self->pid)) {
	return "$0: httpd gracefully restarted\n"
    }
    else {
	return "$0: httpd could not be restarted\n"
    }
}

sub configtest {
    my $self = shift;
    die $self->status unless $self->running;
    if (kill ('USR1', $self->pid)) {
	return "$0: httpd gracefully restarted\n"
    }
    else {
	return "$0: httpd could not be restarted\n"
    }
}

1;