mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-17 06:23:00 +02:00
ids.cgi: Drop dirty hook for updating the ruleset
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
This commit is contained in:
@@ -52,30 +52,6 @@ my $snortrulepath = "/etc/snort/rules";
|
||||
my $snortusedrulefilesfile = "${General::swroot}/snort/snort-used-rulefiles.conf";
|
||||
my $errormessage;
|
||||
|
||||
# Hook used to download and update the ruleset,
|
||||
# if the cgi got called from command line.
|
||||
if ($ENV{"REMOTE_ADDR"} eq "") {
|
||||
# Read snortsettings.
|
||||
&General::readhash("${General::swroot}/snort/settings", \%snortsettings);
|
||||
|
||||
# Download rules tarball.
|
||||
$errormessage = &downloadruleset();
|
||||
|
||||
# Sleep for one second.
|
||||
sleep(1);
|
||||
|
||||
# Check if there was an error message.
|
||||
unless ($errormessage) {
|
||||
# Call oinkmaster.
|
||||
&oinkmaster();
|
||||
} else {
|
||||
# Call logger and log the errormessage.
|
||||
system("logger -t oinkmaster $errormessage");
|
||||
}
|
||||
|
||||
exit(0);
|
||||
}
|
||||
|
||||
&Header::showhttpheaders();
|
||||
|
||||
# Default settings for snort.
|
||||
|
||||
Reference in New Issue
Block a user