Skip to content
Snippets Groups Projects
Commit 15f8ba92 authored by Chris Nehren's avatar Chris Nehren
Browse files

Code and doc fixes for WatchOutput

parent 3159b57a
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,7 @@ Core::WatchOutout - watch a command's output, reporting it
=head1 SYNOPSIS
Core::WatchOutput {
command: cmd => "/bin/ls"
ls: command => "/bin/ls"
}
=head1 DESCRIPTION
......@@ -61,14 +61,14 @@ sub new {
sub handler {
my $self = shift;
my $config = $self->{config};
my $command = $self->{command};
my $command = $config->{command};
my $output = run_command($command);
chomp $output;
my $status = $? >> 8;
return {
"output" => [$self->{check_name}, "s"],
"output" => [$output, "s"],
"return_code" => [$status, "i"],
};
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment