File Coverage

lib/Rex/Service/ALT.pm
Criterion Covered Total %
statement 8 14 57.1
branch n/a
condition 0 3 0.0
subroutine 3 4 75.0
pod 0 1 0.0
total 11 22 50.0


line stmt bran cond sub pod time code
1             #
2             # ALT sevice control support
3             #
4             package Rex::Service::ALT;
5              
6 1     1   17 use v5.12.5;
  1         3  
7 1     1   9 use warnings;
  1         2  
  1         44  
8              
9             our $VERSION = '1.14.2.2'; # TRIAL VERSION
10              
11 1     1   11 use base qw(Rex::Service::Base);
  1         2  
  1         195  
12              
13             sub new {
14 0     0 0   my $that = shift;
15 0   0       my $proto = ref($that) || $that;
16 0           my $self = $proto->SUPER::new(@_);
17              
18 0           bless( $self, $proto );
19              
20             $self->{commands} = {
21 0           start => '/sbin/service %s start',
22             restart => '/sbin/service %s restart',
23             stop => '/sbin/service %s stop',
24             reload => '/sbin/service %s reload',
25             status => '/sbin/service %s status',
26             ensure_stop => '/sbin/chkconfig %s off',
27             ensure_start => '/sbin/chkconfig %s on',
28             action => '/sbin/service %s %s',
29             };
30              
31 0           return $self;
32             }
33              
34             1;