diff options
author | Scott Ullrich <sullrich@sullrich-MacBookPro.local> | 2009-03-31 22:51:32 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@sullrich-MacBookPro.local> | 2009-03-31 22:51:32 -0400 |
commit | d6abaa18c9c0cfdd3c8778897c5f407f34321d08 (patch) | |
tree | f3b95b1a5f9bedcf21741fcda3d76a69ba0e5c46 /usr/local/www/diag_logs_ntpd.php | |
parent | 568f30c2f897bffd08df28abb74b74cc2d8be2ad (diff) | |
download | pfsense-d6abaa18c9c0cfdd3c8778897c5f407f34321d08.zip pfsense-d6abaa18c9c0cfdd3c8778897c5f407f34321d08.tar.gz |
* Add clear_log_file() function and reduce code reuse
* Use clear_log_file() instead of duplicated logic
Diffstat (limited to 'usr/local/www/diag_logs_ntpd.php')
-rw-r--r-- | usr/local/www/diag_logs_ntpd.php | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/usr/local/www/diag_logs_ntpd.php b/usr/local/www/diag_logs_ntpd.php index 57a9aae..3674813 100644 --- a/usr/local/www/diag_logs_ntpd.php +++ b/usr/local/www/diag_logs_ntpd.php @@ -44,19 +44,8 @@ $nentries = $config['syslog']['nentries']; if (!$nentries) $nentries = 50; -if ($_POST['clear']) { - if(isset($config['system']['disablesyslogclog'])) { - unlink($ntpd_logfile); - touch($ntpd_logfile); - } else { -// exec("killall syslogd"); -// sleep(1); -// if(file_exists("{$ntpd_logfile}")) -// unlink("{$ntpd_logfile}"); - exec("/usr/sbin/fifolog_create -s 511488 {$ntpd_logfile}"); - exec("/usr/bin/killall -HUP syslogd"); - } -} +if ($_POST['clear']) + clear_log_file($ntpd_logfile); $pgtitle = array("Status","System logs","OpenNTPD"); include("head.inc"); |