aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/snort/snort.inc5
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/snort/snort.inc b/packages/snort/snort.inc
index 28134af6..6de817be 100644
--- a/packages/snort/snort.inc
+++ b/packages/snort/snort.inc
@@ -495,11 +495,14 @@ function update_all_status($status) {
}
}
-$snort_alert_file_split = split("\n", file_get_contents("/var/log/snort/alert"));
+if(file_exists("/var/log/snort/alert"))
+ $snort_alert_file_split = split("\n", file_get_contents("/var/log/snort/alert"));
/* obtain alert description for an ip address */
function get_snort_alert($ip) {
global $snort_alert_file_split, $snort_config;
+ if(!file_exists("/var/log/snort/alert"))
+ return;
if(!$snort_config)
$snort_config = read_snort_config_cache();
if($snort_config[$ip])