mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fixes to mailscanner and ntp-client snmp injection
git-svn-id: http://www.observium.org/svn/observer/trunk@2635 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -54,7 +54,22 @@
|
||||
echo $count."\n";
|
||||
}
|
||||
}
|
||||
|
||||
function clearStats($mailstats) {
|
||||
if (file_exists($mailstats) {
|
||||
$fp = fopen($mailstats, 'w');
|
||||
fwrite($fp, "mess_recv:0\n");
|
||||
fwrite($fp, "mess_rejected:0\n");
|
||||
fwrite($fp, "mess_relay:0\n");
|
||||
fwrite($fp, "mess_sent:0\n");
|
||||
fwrite($fp, "mess_waiting:0\n");
|
||||
fwrite($fp, "spam:0\n");
|
||||
fwrite($fp, "virus:0\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
|
||||
doSNMPv2($mailstats);
|
||||
$fp = fopen($mailstats, 'w');
|
||||
fwrite($fp, "mess_recv:0\n");
|
||||
clearStats($mailstats);
|
||||
|
||||
?>
|
@@ -32,7 +32,11 @@
|
||||
########################################################################################
|
||||
|
||||
$cmd = shell_exec($ntpq." -c rv | grep '^offset'");
|
||||
$cmd2 = shell_exec($ntpq." -c rv | grep '^stability'");
|
||||
if ($newstats_style) {
|
||||
$cmd2 = shell_exec($ntpq." -c rv | grep '^clk_wander'");
|
||||
} else {
|
||||
$cmd2 = shell_exec($ntpq." -c rv | grep '^stability'");
|
||||
}
|
||||
$vars = array();
|
||||
$vars2 = array();
|
||||
$vars = explode(',', $cmd);
|
||||
|
Reference in New Issue
Block a user