From 95b568faae3d838eeb29e8ea2a46e32e4c1afa0b Mon Sep 17 00:00:00 2001 From: bmeeks8 Date: Wed, 26 Nov 2014 15:39:07 -0500 Subject: Add GUI support for new GeoIP rule options. --- config/suricata/suricata_post_install.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'config/suricata/suricata_post_install.php') diff --git a/config/suricata/suricata_post_install.php b/config/suricata/suricata_post_install.php index 73ba7f50..3a82d567 100644 --- a/config/suricata/suricata_post_install.php +++ b/config/suricata/suricata_post_install.php @@ -66,10 +66,6 @@ global $config, $g, $rebuild_rules, $pkg_interface, $suricata_gui_include; * updated version icluded with the * * updated GUI package. * ****************************************/ -if (!defined('SURICATA_SID_MODS_PATH')) - define('SURICATA_SID_MODS_PATH', '/var/db/suricata/sidmods/'); -if (!defined('SURICATA_IPREP_PATH')) - define('SURICATA_IPREP_PATH', '/var/db/suricata/iprep/'); if (!defined('SURICATA_PBI_BASEDIR')) define('SURICATA_PBI_BASEDIR', '/usr/pbi/suricata-' . php_uname("m")); @@ -116,6 +112,13 @@ safe_mkdir(SURICATALOGDIR); safe_mkdir(SURICATA_SID_MODS_PATH); safe_mkdir(SURICATA_IPREP_PATH); +// Download the latest GeoIP DB updates and create cron task if the feature is not disabled +if ($config['installedpackages']['suricata']['config'][0]['autogeoipupdate'] != 'off') { + log_error(gettext("[Suricata] Installing free GeoIP country database files...")); + include("/usr/local/pkg/suricata/suricata_geoipupdate.php"); + install_cron_job("/usr/bin/nice -n20 /usr/local/bin/php -f /usr/local/pkg/suricata/suricata_geoipupdate.php", TRUE, 0, 0, 8, "*", "*", "root"); +} + // remake saved settings if previously flagged if ($config['installedpackages']['suricata']['config'][0]['forcekeepsettings'] == 'on') { log_error(gettext("[Suricata] Saved settings detected... rebuilding installation with saved settings...")); -- cgit v1.2.3