From cc636c4741e7928276a1a5c7048b4fc0693c7f23 Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Fri, 22 Feb 2019 10:04:27 +0100 Subject: [PATCH] convert-snort: Try to download ruleset if none is present. Signed-off-by: Stefan Schantl --- config/suricata/convert-snort | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/config/suricata/convert-snort b/config/suricata/convert-snort index 20ba353109..ca650b149a 100644 --- a/config/suricata/convert-snort +++ b/config/suricata/convert-snort @@ -226,6 +226,14 @@ if (-f $snort_rules_tarball) { # Set correct ownership. &IDS::set_ownership("$IDS::rulestarball"); + +# In case no tarball is present, try to download the ruleset. +} else { + # Check if enought disk space is available. + if(&IDS::checkdiskspace()) { + # Call the download function and grab the new ruleset. + &IDS::downloadruleset(); + } } # @@ -236,6 +244,9 @@ if (-f $snort_rules_tarball) { if (-f $IDS::rulestarball) { # Launch oinkmaster by calling the subfunction. &IDS::oinkmaster(); + + # Set correct ownership for the rulesdir and files. + &IDS::set_ownership("$IDS::rulespath"); } # -- 2.39.2