Ubic-Service-InitScriptWrapper
view release on metacpan or search on metacpan
lib/Ubic/Service/InitScriptWrapper.pm view on Meta::CPAN
die "Invalid parameters" unless @_ == 1;
if ($init !~ m{/}) {
$init = "/etc/init.d/$init";
}
unless (-e $init) {
die "Init script $init not found";
}
return bless { init => $init } => $class;
}
sub start_impl {
my $self = shift;
system("$self->{init} start >/dev/null");
}
sub stop_impl {
my $self = shift;
system("$self->{init} stop >/dev/null");
( run in 0.317 second using v1.01-cache-2.11-cpan-65fba6d93b7 )