aboutsummaryrefslogtreecommitdiffstats
path: root/packages/snort/snort_alerts.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-09-28 00:18:26 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-09-28 00:18:26 +0000
commit7bac1f11060cc4e06569c125335e81f78a333fa2 (patch)
tree830584ea8f42a14f06f84bef43e28ea37da48abb /packages/snort/snort_alerts.php
parent778bdf304750db78d7b7202bdbc110ba919be360 (diff)
downloadpfsense-packages-7bac1f11060cc4e06569c125335e81f78a333fa2.tar.gz
pfsense-packages-7bac1f11060cc4e06569c125335e81f78a333fa2.tar.bz2
pfsense-packages-7bac1f11060cc4e06569c125335e81f78a333fa2.zip
Restart snort2c after clearing alerts
Diffstat (limited to 'packages/snort/snort_alerts.php')
-rw-r--r--packages/snort/snort_alerts.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/snort/snort_alerts.php b/packages/snort/snort_alerts.php
index 2589a382..81fe4bf3 100644
--- a/packages/snort/snort_alerts.php
+++ b/packages/snort/snort_alerts.php
@@ -42,9 +42,10 @@ if (!$nentries)
if ($_POST['clear']) {
exec("killall syslogd");
exec("rm {$snort_logfile}; touch {$snort_logfile}");
- system_syslogd_start();
+ system_syslogd_start();
exec("/usr/bin/killall -HUP snort");
- exec("/usr/bin/killall -HUP snort2c");
+ exec("/usr/bin/killall snort2c");
+ exec("/usr/local/bin/snort2c -w /var/db/whitelist -a /var/log/snort/alert");
}
$pgtitle = "Services: Snort: Snort Alerts";
@@ -98,7 +99,7 @@ function dump_log_file($logfile, $tail, $withorig = true, $grepfor = "", $grepin
$logarr = "";
exec("cat {$logfile} | /usr/bin/tail -n {$tail}", $logarr);
foreach ($logarr as $logent) {
- if(!logent)
+ if(!logent)
continue;
echo "<tr valign=\"top\">\n";
echo "<td colspan=\"2\" class=\"listr\">" . $logent . "&nbsp;</td>\n";