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