| 1 | # | ||||||||||||||||||||
| 2 | # ALT sevice control support | ||||||||||||||||||||
| 3 | # | ||||||||||||||||||||
| 4 | package Rex::Service::ALT; | ||||||||||||||||||||
| 5 | |||||||||||||||||||||
| 6 | 1 | ▶ | use v5.14.4; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 7 | 1 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 8 | |||||||||||||||||||||
| 9 | 1 | our $VERSION = '1.16.1'; # VERSION | |||||||||||||||||||
| 10 | |||||||||||||||||||||
| 11 | 1 | ▶ | use base qw(Rex::Service::Base); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | 0 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 14 | 0 | my $that = shift; | |||||||||||||||||||
| 15 | 0 | ▶ | my $proto = ref($that) || $that; | ||||||||||||||||||
|
Condition0%0/3
ref $that || $that
MC/DC0%0/2
ref $that || $that
ref $that
$that
Truth table0%0/3
A || B
A= ref $thatB= $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 | 1; | |||||||||||||||||||