diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/snort-dev/snort_download_rules.inc | 11 | ||||
-rw-r--r-- | config/snort-dev/snort_new.inc | 10 |
2 files changed, 21 insertions, 0 deletions
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() { |