From 60d3c539241204940abd70dd0ff84b56708dd25a Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Fri, 24 Apr 2015 09:59:58 -0300 Subject: 2.3+ won't use PBI anymore --- config/snort/snort_defs.inc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/snort/snort_defs.inc b/config/snort/snort_defs.inc index 906dd465..912fa3d3 100644 --- a/config/snort/snort_defs.inc +++ b/config/snort/snort_defs.inc @@ -34,8 +34,13 @@ global $g, $config; /* Define some useful constants for Snort */ -if (!defined("SNORT_PBI_BASEDIR")) - define("SNORT_PBI_BASEDIR", "/usr/pbi/snort-" . php_uname("m") . "/"); +if (!defined("SNORT_PBI_BASEDIR")) { + $pf_version=substr(trim(file_get_contents("/etc/version")),0,3); + if ($pf_version == "2.1" || $pf_version == "2.2") + define("SNORT_PBI_BASEDIR", "/usr/pbi/snort-" . php_uname("m") . "/"); + else + define("SNORT_PBI_BASEDIR", "/usr/local/"); +} if (!defined("SNORT_PBI_BINDIR")) define("SNORT_PBI_BINDIR", SNORT_PBI_BASEDIR . "bin/"); if (!defined("SNORTDIR")) -- cgit v1.2.3