summaryrefslogtreecommitdiffstats
path: root/usr/local/www/diag_logs_filter_dynamic.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@sullrich-MacBookPro.local>2009-03-18 19:46:24 -0400
committerScott Ullrich <sullrich@sullrich-MacBookPro.local>2009-03-18 19:46:24 -0400
commit783cdcaaa733a4415eeaea21309b0437602b3929 (patch)
tree228fc62f36d17da41d7ffedd9c5b2661734fe4e0 /usr/local/www/diag_logs_filter_dynamic.php
parent3d5b2e45e7a3d0ad6ae7dc59345283e626f675d2 (diff)
downloadpfsense-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-xusr/local/www/diag_logs_filter_dynamic.php5
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();
}
}
OpenPOWER on IntegriCloud