iankelling.org
/
git
/
distro-setup
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c926b55
)
improve alerts
author
Ian Kelling
<ian@iankelling.org>
Tue, 30 Jul 2019 18:21:02 +0000
(14:21 -0400)
committer
Ian Kelling
<ian@iankelling.org>
Tue, 30 Jul 2019 18:21:02 +0000
(14:21 -0400)
system-status
patch
|
blob
|
history
diff --git
a/system-status
b/system-status
index 78d0fdaec1628894869d7459a6712994352053b8..f39f03176fdae290843d45ea851641ade5b21056 100755
(executable)
--- a/
system-status
+++ b/
system-status
@@
-14,6
+14,8
@@
status_file=/dev/shm/iank-status
shopt -s nullglob
shopt -s dotglob
shopt -s nullglob
shopt -s dotglob
+lo() { /usr/local/bin/log-once -1 "$@"; }
+
write-status() {
chars=()
write-status() {
chars=()
@@
-24,6
+26,7
@@
write-status() {
glob=(/m/md/bounces/new/*)
if [[ -e $glob ]]; then
chars+=("BOUNCE!")
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
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!")
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!")
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
fi
source /a/bin/bash_unpublished/source-state