aboutsummaryrefslogtreecommitdiffstats
path: root/config/suricata/suricata_post_install.php
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2014-11-26 15:39:07 -0500
committerbmeeks8 <bmeeks8@bellsouth.net>2014-12-15 12:15:44 -0500
commit95b568faae3d838eeb29e8ea2a46e32e4c1afa0b (patch)
tree2a728f9d4852c3a004d952f89eab5e59097a8b8a /config/suricata/suricata_post_install.php
parent617fe1038c458fcd366f675d2f94a6c2401a78a2 (diff)
downloadpfsense-packages-95b568faae3d838eeb29e8ea2a46e32e4c1afa0b.tar.gz
pfsense-packages-95b568faae3d838eeb29e8ea2a46e32e4c1afa0b.tar.bz2
pfsense-packages-95b568faae3d838eeb29e8ea2a46e32e4c1afa0b.zip
Add GUI support for new GeoIP rule options.
Diffstat (limited to 'config/suricata/suricata_post_install.php')
-rw-r--r--config/suricata/suricata_post_install.php11
1 files changed, 7 insertions, 4 deletions
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..."));