diff options
author | Scott Ullrich <sullrich@sullrich-MacBookPro.local> | 2009-03-18 19:46:24 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@sullrich-MacBookPro.local> | 2009-03-18 19:46:24 -0400 |
commit | 783cdcaaa733a4415eeaea21309b0437602b3929 (patch) | |
tree | 228fc62f36d17da41d7ffedd9c5b2661734fe4e0 /usr/local/www/diag_logs_filter_dynamic.php | |
parent | 3d5b2e45e7a3d0ad6ae7dc59345283e626f675d2 (diff) | |
download | pfsense-783cdcaaa733a4415eeaea21309b0437602b3929.zip pfsense-783cdcaaa733a4415eeaea21309b0437602b3929.tar.gz |
* Rm log file before fifolog_create if it exists
* Do not hard code path to logs
Diffstat (limited to 'usr/local/www/diag_logs_filter_dynamic.php')
-rwxr-xr-x | usr/local/www/diag_logs_filter_dynamic.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr/local/www/diag_logs_filter_dynamic.php b/usr/local/www/diag_logs_filter_dynamic.php index 5b161d4..9c16124 100755 --- a/usr/local/www/diag_logs_filter_dynamic.php +++ b/usr/local/www/diag_logs_filter_dynamic.php @@ -37,7 +37,6 @@ ##|*MATCH=diag_logs_filter_dynamic.php* ##|-PRIV - require("guiconfig.inc"); $filter_logfile = "{$g['varlog_path']}/filter.log"; @@ -54,7 +53,9 @@ if ($_POST['clear']) { touch("/var/log/filter.log"); } else { exec("killall syslogd"); - exec("/usr/sbin/fifolog_create -s 511488 /var/log/filter.log"); + if(file_exists("{$filter_logfile}") + unlink_file("{$filter_logfile}"); + exec("/usr/sbin/fifolog_create -s 511488 {$filter_logfile}"); system_syslogd_start(); } } |