]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/monitoring/plugins/check_emails
Add e-mail relay monitoring for backup-2 and monitoring-1
[perso/Immae/Config/Nix.git] / modules / private / monitoring / plugins / check_emails
index 0ee3e4e698052a3e7c7ed31f95098299ee82a33a..5a8453e70f7aa82b182e54c4c77a2724728ca15d 100755 (executable)
@@ -37,7 +37,7 @@ my @emails_to_expect = split(/,/, $opts{'f'});
 
 my $cmd_result;
 if ($local_directory ne '') {
-  if (! -d $local_directory) {
+  if (@emails_to_expect and ! -d $local_directory) {
     print "Emails $host UNKNOWN - Could not find local directory";
     exit($STATE_UNKNOWN);
   }