improve alerts
authorIan Kelling <ian@iankelling.org>
Tue, 30 Jul 2019 18:21:02 +0000 (14:21 -0400)
committerIan Kelling <ian@iankelling.org>
Tue, 30 Jul 2019 18:21:02 +0000 (14:21 -0400)
system-status

index 78d0fdaec1628894869d7459a6712994352053b8..f39f03176fdae290843d45ea851641ade5b21056 100755 (executable)
@@ -14,6 +14,8 @@ status_file=/dev/shm/iank-status
 shopt -s nullglob
 shopt -s dotglob
 
+lo() { /usr/local/bin/log-once -1 "$@"; }
+
 write-status() {
   chars=()
 
@@ -24,6 +26,7 @@ write-status() {
   glob=(/m/md/bounces/new/*)
   if [[ -e $glob ]]; then
     chars+=("BOUNCE!")
+    lo bounce "message in /m/md/bounces/new"
   fi
   glob=(/m/md/alerts/new/* /m/md/alerts/cur/*)
   if [[ -e $glob ]]; then
@@ -31,9 +34,11 @@ write-status() {
   fi
   if [[ -e /nocow/user/mailtest-failure ]]; then
     chars+=("MAILPING!")
+    lo mailping "mailtest-check didnt see mail from send-test-forward"
   fi
   if [[ -s /var/log/exim4/paniclog ]]; then
     chars+=("PANIC!")
+    tail /var/log/exim4/paniclog | lo paniclog
   fi
 
   source /a/bin/bash_unpublished/source-state