convert-snort: Try to download ruleset if none is present.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
This commit is contained in:
Stefan Schantl
2019-02-22 10:04:27 +01:00
parent 5d7d8749dc
commit cc636c4741

View File

@@ -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");
}
#