line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# (c) Jan Gehring |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Rex::Service::OpenBSD; |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
22
|
use v5.12.5; |
|
1
|
|
|
|
|
6
|
|
8
|
1
|
|
|
1
|
|
19
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
59
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '1.14.2.2'; # TRIAL VERSION |
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
10
|
use Rex::Commands::File; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
12
|
|
13
|
1
|
|
|
1
|
|
15
|
use Rex::Logger; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
7
|
|
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
1
|
|
39
|
use base qw(Rex::Service::Base); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
248
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub new { |
18
|
0
|
|
|
0
|
0
|
|
my $that = shift; |
19
|
0
|
|
0
|
|
|
|
my $proto = ref($that) || $that; |
20
|
0
|
|
|
|
|
|
my $self = $proto->SUPER::new(@_); |
21
|
|
|
|
|
|
|
|
22
|
0
|
|
|
|
|
|
bless( $self, $proto ); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
$self->{commands} = { |
25
|
0
|
|
|
|
|
|
start => '/usr/sbin/rcctl start %s', |
26
|
|
|
|
|
|
|
restart => '/usr/sbin/rcctl restart %s', |
27
|
|
|
|
|
|
|
stop => '/usr/sbin/rcctl stop %s', |
28
|
|
|
|
|
|
|
reload => '/usr/sbin/rcctl reload %s', |
29
|
|
|
|
|
|
|
status => '/usr/sbin/rcctl check %s', |
30
|
|
|
|
|
|
|
ensure_start => '/usr/sbin/rcctl enable %s', |
31
|
|
|
|
|
|
|
ensure_stop => '/usr/sbin/rcctl disable %s', |
32
|
|
|
|
|
|
|
action => '/usr/sbin/rcctl action %s', |
33
|
|
|
|
|
|
|
}; |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
|
|
|
return $self; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |