App-Acmeman

 view release on metacpan or  search on metacpan

lib/App/Acmeman/Apache/Layout/debian.pm  view on Meta::CPAN

use parent 'App::Acmeman::Apache::Layout';
use File::Basename;

our $PRIORITY = 20;

sub new {
    my $class = shift;
    my $ap = shift;

    if ($ap->server_config eq '/etc/apache2/apache2.conf') {
	return $class->SUPER::new($ap,
		     restart_command => '/usr/sbin/service apache2 restart'
	       );
    }
}

sub incdir {
    for my $dir ('/etc/apache2/conf-available', '/etc/apache2/conf.d') {
	return $dir if -d $dir;
    }
    carp 'none of the expected configuration directories found; falling back to /etc/apache2';

lib/App/Acmeman/Apache/Layout/rh.pm  view on Meta::CPAN

use Carp;
use parent 'App::Acmeman::Apache::Layout';

our $PRIORITY = 30;

sub new {
    my $class = shift;
    my $ap = shift;

    if ($ap->server_config eq '/etc/httpd/conf/httpd.conf') {
	return $class->SUPER::new($ap,
			  incdir => '/etc/httpd/conf.d',
			  restart_command => '/usr/sbin/service httpd restart'
	       );
    }
}

1;

lib/App/Acmeman/Apache/Layout/slackware.pm  view on Meta::CPAN

use File::BackupCopy;

our $PRIORITY = 10;

sub new {
    my $class = shift;
    my $ap = shift;

    if ($ap->server_config eq  '/etc/httpd/httpd.conf'
	&& -d '/etc/httpd/extra') {
	return $class->SUPER::new($ap,
			incdir => '/etc/httpd/extra',
			restart_command => '/etc/rc.d/rc.httpd restart'
	       );
    }
}

sub post_setup {
    my ($self,$filename) = @_;

    my $master_config_file = $self->config_file;

lib/App/Acmeman/Apache/Layout/suse.pm  view on Meta::CPAN

use parent 'App::Acmeman::Apache::Layout';

our $PRIORITY = 40;

sub new {
    my $class = shift;
    my $ap = shift;

    if ($ap->server_config eq '/etc/apache2/httpd.conf'
	&& ! -f '/etc/apache2/apache2.conf') {
	return $class->SUPER::new($ap,
			incdir => '/etc/apache2/conf.d',
			restart_command => '/usr/sbin/service httpd restart'
	       );
    }
}

1;

lib/App/Acmeman/Config.pm  view on Meta::CPAN

use App::Acmeman::Log qw(debug_level :sysexits);
use File::Spec;

sub new {
    my $class = shift;
    my $filename = shift;
    my %args;
    if (-e $filename) {
	$args{filename} = $filename;
    }
    my $self = $class->SUPER::new(%args);
    if (!$args{filename}) {
	$self->commit or croak "configuration failed";
    }
    $self
}

sub mangle {
    my $self = shift;
    my $err;



( run in 1.152 second using v1.01-cache-2.11-cpan-49f99fa48dc )