iankelling.org
/
git
/
distro-setup
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
minor lists updates
[distro-setup]
/
check-remote-mailqs
diff --git
a/check-remote-mailqs
b/check-remote-mailqs
index 3caaa61be67db995ba291b24038937cd299e7c8b..df67a041544c7e049642462c4ac9bc39757c7d05 100755
(executable)
--- a/
check-remote-mailqs
+++ b/
check-remote-mailqs
@@
-26,9
+26,16
@@
for h in bk je li frodo kwwg x3wg x2wg kdwg sywg; do
else
if [[ -s $statefile ]]; then
logsec=$(date +%s -d "$(head -n1 $statefile | awk '{print $1,$2}')")
else
if [[ -s $statefile ]]; then
logsec=$(date +%s -d "$(head -n1 $statefile | awk '{print $1,$2}')")
- nowsec=$(date +%s)
- if (( logsec < nowsec - 60*60*48 )); then
- echo $0: host $h ssh /usr/local/bin/check-mailq fail for over 48 hours
+ case h in
+ frodo)
+ hours=200
+ ;;
+ *)
+ hours=20
+ ;;
+ esac
+ if (( logsec < EPOCHSECONDS - 60*60*hours )); then
+ echo $0: host $h ssh /usr/local/bin/check-mailq fail for over $hours hours
fi
fi
printf "%s\n" "$c" | ts "%F %T" >> $statefile
fi
fi
printf "%s\n" "$c" | ts "%F %T" >> $statefile