diff options
author | bmeeks8 <bmeeks8@bellsouth.net> | 2015-07-22 22:23:09 -0400 |
---|---|---|
committer | bmeeks8 <bmeeks8@bellsouth.net> | 2015-07-22 22:23:09 -0400 |
commit | 850c160b28720cae3e94c58d5a4d137a11076c35 (patch) | |
tree | 9419b0aba50eaa424a8bcaab88a1fd42a816a220 /config | |
parent | 066ca0c244b349aff2dea6bf8d896bd6c83febbc (diff) | |
download | pfsense-packages-850c160b28720cae3e94c58d5a4d137a11076c35.tar.gz pfsense-packages-850c160b28720cae3e94c58d5a4d137a11076c35.tar.bz2 pfsense-packages-850c160b28720cae3e94c58d5a4d137a11076c35.zip |
Show Suricata binary version on package home page.
Diffstat (limited to 'config')
-rw-r--r-- | config/suricata/suricata_defs.inc | 12 | ||||
-rw-r--r-- | config/suricata/suricata_interfaces.php | 3 |
2 files changed, 13 insertions, 2 deletions
diff --git a/config/suricata/suricata_defs.inc b/config/suricata/suricata_defs.inc index 5467f88c..29e0a368 100644 --- a/config/suricata/suricata_defs.inc +++ b/config/suricata/suricata_defs.inc @@ -52,7 +52,7 @@ if (!is_array($config['installedpackages']['suricata'])) $config['installedpackages']['suricata'] = array(); /* Get installed package version for display */ -$suricata_package_version = "Suricata {$config['installedpackages']['package'][get_pkg_id("suricata")]['version']}"; +$suricata_package_version = "{$config['installedpackages']['package'][get_pkg_id("suricata")]['version']}"; // Define the installed package version if (!defined('SURICATA_PKG_VER')) @@ -71,6 +71,16 @@ if (!defined('SURICATA_PBI_BASEDIR')) { if (!defined('SURICATA_PBI_BINDIR')) define('SURICATA_PBI_BINDIR', SURICATA_PBI_BASEDIR . 'bin/'); +if (!defined("SURICATA_BIN_VERSION")) { + // Grab the Suricata binary version programmatically + $suricatabindir = SURICATA_PBI_BINDIR; + $suricataver = exec_command("{$suricatabindir}suricata -V 2>&1 |/usr/bin/cut -c26-"); + if (!empty($suricataver)) + define("SURICATA_BIN_VERSION", $suricataver); + else + define("SURICATA_BIN_VERSION", ""); +} + // Define the name of the pf table used for IP blocks if (!defined('SURICATA_PF_TABLE')) define('SURICATA_PF_TABLE', 'snort2c'); diff --git a/config/suricata/suricata_interfaces.php b/config/suricata/suricata_interfaces.php index e996a24f..39291803 100644 --- a/config/suricata/suricata_interfaces.php +++ b/config/suricata/suricata_interfaces.php @@ -145,8 +145,9 @@ if ($_POST['toggle']) { header("Location: /suricata/suricata_interfaces.php"); exit; } +$suri_bin_ver = SURICATA_BIN_VERSION; $suri_pkg_ver = SURICATA_PKG_VER; -$pgtitle = "Services: {$suri_pkg_ver} - Intrusion Detection System"; +$pgtitle = "Services: Suricata {$suri_bin_ver} pkg v{$suri_pkg_ver} - Intrusion Detection System"; include_once("head.inc"); ?> |