From: Stefan Schantl Date: Thu, 18 Feb 2016 09:45:21 +0000 (+0100) Subject: Only try to re-read IgnoreFile on reload if one is configured. X-Git-Tag: 2.0~28 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8d8309c137e84e94cf99fc8f8241e4fcf3045c80;p=people%2Fstevee%2Fguardian.git Only try to re-read IgnoreFile on reload if one is configured. Only try to read-in the IgnoreFile when calling an reload, if one has been specified. Signed-off-by: Stefan Schantl --- diff --git a/guardian b/guardian index 7b4c23f..c1bf4ca 100644 --- a/guardian +++ b/guardian @@ -387,8 +387,10 @@ sub Reload () { # Update logger object in mainsettings hash. $mainsettings{Logger} = $logger; - # Update ignore list. - &Guardian::Events::GenerateIgnoreList($mainsettings{IgnoreFile}); + # Update ignore list, if one has been specified. + if (exists($mainsettings{IgnoreFile})) { + &Guardian::Events::GenerateIgnoreList($mainsettings{IgnoreFile}); + } # Re-generate hash of monitored files. %monitored_files = &Guardian::Base::GenerateMonitoredFiles(\%mainsettings, \%monitored_files);