mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-11 03:25:54 +02:00
update-ids-ruleset: Silent script if no providers settings file exists.
Only try to read-in the providers settings file, in case it exists. Otherwise the script produces an error message, about the missing file, each time it gets executed. Because of the fcron job this would be twice a day in most cases. Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
This commit is contained in:
@@ -95,8 +95,8 @@ if ($return) {
|
||||
# The script has requested a lock, so set locket to "1".
|
||||
$locked = "1";
|
||||
|
||||
# Grab the configured providers.
|
||||
&General::readhasharray("$IDS::providers_settings_file", \%providers);
|
||||
# Grab the configured providers, if the providers settings file exists.
|
||||
&General::readhasharray("$IDS::providers_settings_file", \%providers) if (-f "$IDS::providers_settings_file");
|
||||
|
||||
# Loop through the array of available providers.
|
||||
foreach my $id (keys %providers) {
|
||||
|
||||
Reference in New Issue
Block a user