From d6abaa18c9c0cfdd3c8778897c5f407f34321d08 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 31 Mar 2009 22:51:32 -0400 Subject: * Add clear_log_file() function and reduce code reuse * Use clear_log_file() instead of duplicated logic --- usr/local/www/diag_logs_relayd.php | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'usr/local/www/diag_logs_relayd.php') diff --git a/usr/local/www/diag_logs_relayd.php b/usr/local/www/diag_logs_relayd.php index ef138e7..5d84eed 100755 --- a/usr/local/www/diag_logs_relayd.php +++ b/usr/local/www/diag_logs_relayd.php @@ -45,19 +45,8 @@ $nentries = $config['syslog']['nentries']; if (!$nentries) $nentries = 50; -if ($_POST['clear']) { - if(isset($config['system']['disablesyslogclog'])) { - unlink($relayd_logfile); - touch($relayd_logfile); - } else { -// exec("killall syslogd"); -// sleep(1); -// if(file_exists("{$relayd_logfile}")) -// unlink("{$relayd_logfile}"); - exec("/usr/sbin/fifolog_create -s 511488 {$relayd_logfile}"); - exec("/usr/bin/killall -HUP syslogd"); - } -} +if ($_POST['clear']) + clear_log_file($relayd_logfile); $pgtitle = array("Status","System logs","Load Balancer"); include("head.inc"); -- cgit v1.1