line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# ALT sevice control support |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
package Rex::Service::ALT; |
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
39
|
use v5.12.5; |
|
1
|
|
|
|
|
14
|
|
7
|
1
|
|
|
1
|
|
17
|
use warnings; |
|
1
|
|
|
|
|
13
|
|
|
1
|
|
|
|
|
98
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '1.14.2.3'; # TRIAL VERSION |
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
12
|
use base qw(Rex::Service::Base); |
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
321
|
|
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; |