]> git.ipfire.org Git - people/stevee/guardian.git/commitdiff
Only try to re-read IgnoreFile on reload if one is configured.
authorStefan Schantl <stefan.schantl@ipfire.org>
Thu, 18 Feb 2016 09:45:21 +0000 (10:45 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Thu, 18 Feb 2016 09:45:21 +0000 (10:45 +0100)
Only try to read-in the IgnoreFile when calling an reload, if
one has been specified.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
guardian

index 7b4c23fae7b86c7e2d5b1ea7a726a23b03baf2f9..c1bf4caa31593a8350205ff116f8430583b196ea 100644 (file)
--- 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);