diff --git a/scripts/mailscanner.php b/scripts/mailscanner.php index 35a9f4828..7d23c1752 100644 --- a/scripts/mailscanner.php +++ b/scripts/mailscanner.php @@ -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); + +?> \ No newline at end of file diff --git a/scripts/ntp-client.php b/scripts/ntp-client.php index 229db1afe..cdebf640f 100644 --- a/scripts/ntp-client.php +++ b/scripts/ntp-client.php @@ -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);