ids.cgi: Move function to call oinkmaster to ids-functions.pl

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
This commit is contained in:
Stefan Schantl
2018-02-14 08:58:18 +01:00
parent eea2670b39
commit 25f5cb0d4b
2 changed files with 14 additions and 5 deletions

View File

@@ -147,4 +147,12 @@ sub downloadruleset {
return;
}
#
## A tiny wrapper function to call the oinkmaster script.
#
sub oinkmaster () {
# Call oinkmaster to generate ruleset.
system("/usr/local/bin/oinkmaster.pl -v -s -u file://$rulestarball -C /var/ipfire/snort/oinkmaster.conf -o /etc/snort/rules 2>&1 |logger -t oinkmaster");
}
1;

View File

@@ -598,11 +598,12 @@ END
exit;
}
sub oinkmaster () {
# Call oinkmaster to generate ruleset.
system("/usr/local/bin/oinkmaster.pl -v -s -u file://$rulestarball -C /var/ipfire/snort/oinkmaster.conf -o /etc/snort/rules 2>&1 |logger -t oinkmaster");
}
#
## Private function to read-in and parse rules of a given rulefile.
#
## The given file will be read, parsed and all valid rules will be stored by ID,
## message/description and it's state in the snortrules hash.
#
sub readrulesfile ($) {
my $rulefile = shift;