todo comment
[distro-setup] / check-stale-alerts
1 #!/bin/bash
2 if [[ ! -e /dev/shm/iank-status ]]; then
3 exit 0
4 fi
5 eval $(< /dev/shm/iank-status)
6
7 if [[ $HOSTNAME != "$MAIL_HOST" ]]; then
8 exit 0
9 fi
10 out=$(find /var/local/cron-errors /home/iank/cron-errors /sysd-mail-once-state -type f -ctime +4)
11 if [[ $out ]]; then
12 echo HOSTNAME: $HOSTNAME
13 printf "%s\n" "$out"
14 fi
15 for h in {li,bk,je}.b8.nz; do
16 out=$(ssh $h find /m/md/bounces/new /var/local/cron-errors /home/iank/cron-errors /sysd-mail-once-state -type f)
17 if [[ $out ]]; then
18 echo $h:
19 printf "%s\n" "$out"
20 fi
21 done