File Coverage

lib/Rex/Service/OpenBSD.pm
Criterion Covered Total %
statement 14 20 70.0
branch n/a
condition 0 3 0.0
subroutine 5 6 83.3
pod 0 1 0.0
total 19 30 63.3


line stmt bran cond sub pod time code
1             #
2             # (c) Jan Gehring
3             #
4              
5             package Rex::Service::OpenBSD;
6              
7 1     1   15 use v5.12.5;
  1         3  
8 1     1   6 use warnings;
  1         2  
  1         43  
9              
10             our $VERSION = '1.14.2.3'; # TRIAL VERSION
11              
12 1     1   6 use Rex::Commands::File;
  1         4  
  1         6  
13 1     1   8 use Rex::Logger;
  1         2  
  1         6  
14              
15 1     1   28 use base qw(Rex::Service::Base);
  1         2  
  1         198  
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;