From 8eebe3f81f19f27c2dd955813bc4bb8661b61103 Mon Sep 17 00:00:00 2001 From: robiscool Date: Wed, 20 Jul 2011 12:59:18 -0700 Subject: snort-dev, add create snortDBtemp to inc files --- config/snort-dev/snort_download_rules.inc | 11 +++++++++++ config/snort-dev/snort_new.inc | 10 ++++++++++ 2 files changed, 21 insertions(+) (limited to 'config/snort-dev') diff --git a/config/snort-dev/snort_download_rules.inc b/config/snort-dev/snort_download_rules.inc index 09770c4f..df292a94 100644 --- a/config/snort-dev/snort_download_rules.inc +++ b/config/snort-dev/snort_download_rules.inc @@ -43,6 +43,17 @@ * */ + +// create and cp to tmp db dir +if (!file_exists('/var/snort/')) { + exec('/bin/mkdir -p /var/snort/'); +} + +if (file_exists('/usr/local/pkg/snort/snortDBtemp')) { + exec('/bin/cp /usr/local/pkg/snort/snortDBtemp /var/snort/snortDBtemp'); +} + + // fetch db Settings NONE Json function snortSql_fetchAllSettings2($dbname, $table, $type, $id_uuid) { diff --git a/config/snort-dev/snort_new.inc b/config/snort-dev/snort_new.inc index 073319ca..ffc88348 100644 --- a/config/snort-dev/snort_new.inc +++ b/config/snort-dev/snort_new.inc @@ -51,6 +51,16 @@ if(isset($_POST['__csrf_magic'])) { require_once("config.inc"); require_once("functions.inc"); + +// create and cp to tmp db dir +if (!file_exists('/var/snort/')) { + exec('/bin/mkdir -p /var/snort/'); +} + +if (file_exists('/usr/local/pkg/snort/snortDBtemp')) { + exec('/bin/cp /usr/local/pkg/snort/snortDBtemp /var/snort/snortDBtemp'); +} + // Wites selected sig to file function snortSidStringRuleEditGUI() { -- cgit v1.2.3