Added checking for shh file to be quite
authorAndrew DeFaria <Andrew@DeFaria.com>
Fri, 16 Oct 2020 16:37:15 +0000 (09:37 -0700)
committerAndrew DeFaria <Andrew@DeFaria.com>
Fri, 16 Oct 2020 16:37:15 +0000 (09:37 -0700)
bin/announceEmail.pl

index 94789e8..7a76fc4 100755 (executable)
@@ -155,6 +155,12 @@ sub Connect2IMAP() {
 sub Say($) {
   my ($msg) = @_;
 
+  if (-f "$FindBin::Bin/shh") {
+    $log->msg("Not speaking because we were asked to be quiet - $msg");
+
+    return;
+  } # if
+
   my ($status, @output) = Execute "/usr/local/bin/gt \"$msg\"";
 
   $log->err("Unable to speak (Status: $status) - "