From: Stefan Schantl Date: Fri, 22 Feb 2019 09:04:27 +0000 (+0100) Subject: convert-snort: Try to download ruleset if none is present. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cc636c4741e7928276a1a5c7048b4fc0693c7f23;p=people%2Fstevee%2Fipfire-2.x.git convert-snort: Try to download ruleset if none is present. Signed-off-by: Stefan Schantl --- 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"); } #