Skip to content

Commit

Permalink
Updating needrestart probe
Browse files Browse the repository at this point in the history
  • Loading branch information
carsso committed Aug 8, 2023
1 parent 44a9132 commit a0dc314
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.73.28
0.73.29
10 changes: 7 additions & 3 deletions probes/examples/needrestart
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,18 @@ unless ( -x $needrestart )

my $outNeedRestart = `$needrestart -k -p -l`;
my $returnCode = $?;
my @lines = split("\n", $outNeedRestart);
detail->{'output'} = $lines[0];
detail->{'returncode'} = $returnCode;
if($returnCode == 512)
{
status 200;
message "Restart needed";
}
elsif($returnCode == 256)
{
message "Restart not required";
}
elsif($returnCode)
{
status 500;
Expand All @@ -47,7 +54,4 @@ else
message "Restart not needed";
}

my @lines = split("\n", $outNeedRestart);
detail->{'output'} = $lines[0];

output 0;

0 comments on commit a0dc314

Please sign in to comment.