Skip to content

Commit

Permalink
Implement @Skywalker-11 suggestion to count postfix processes
Browse files Browse the repository at this point in the history
  • Loading branch information
endelwar committed Nov 28, 2018
1 parent 10661c8 commit 6da8cd2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mailscanner/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,11 @@ function printServiceStatus()
echo ' <tr><td>' . 'MSMilter' . __('colon99') . '</td>'
. '<td align="center">' . $running . '</td><td align="right">' . $procs . '</td></tr>' . "\n";
} else {
exec("ps ax | grep $mta | grep -v grep | grep -v php", $output);
$psExecCommand = "ps ax | grep $mta | grep -v grep | grep -v php";
if ($mta === 'postfix') {
$psExecCommand = 'ps -U postfix -u postfix | grep -v MailScanner | grep -v "MailWatch SQL"';
}
exec($psExecCommand, $output);
if (count($output) > 0) {
$running = $yes;
} else {
Expand Down

0 comments on commit 6da8cd2

Please sign in to comment.