3 trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
5 if [[ $EUID != 1000 ]]; then
6 echo "$0: error run as normal user" >&2
10 cd /m
/md
/l
/testignore
/new
13 # we run this cronjob along with sending the test email every 10
14 # minutes, so give it 2 minutes to arrive, then if there is an email at
15 # least 23 minutes old, the last 2 test emails have failed.
16 if [[ ! $1 && $
- != *i
* ]]; then
22 if [[ $file -nt $latest ]]; then
27 if [[ $latest ]]; then
28 last_sec
=$
(awk '/^Subject: / {print $3}' $latest)
32 limit
=$
(( now
- 60 * 23 ))
34 if (( last_sec
<= limit
)); then
35 echo $HOSTNAME mailtest failure
36 touch /nocow
/user
/mailtest-failure
38 rm -f /nocow
/user
/mailtest-failure
41 find .
-type f
-mtime +1 -delete