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
13 # We run this cronjob along with sending the test email every 5 minutes,
14 # so give it 1 minute to arrive, then if the latest email is older than
15 # 7 minutes, the last 2 haven't arrived in a reasonable amount of time.
18 if [[ ! $1 && $
- != *i
* ]]; then
23 folder
=/m
/md
/l
/testignore
/new
24 find $folder -type f
-mtime +1 -delete
30 if [[ $file -nt $latest ]]; then
35 if [[ $latest ]]; then
36 last_sec
=$
(awk '/^Subject: / {print $3}' $latest)
40 limit
=$
(( now
- 60 * min_limit
))
42 if (( last_sec
<= limit
)); then
43 echo $HOSTNAME mailtest failure
44 touch /nocow
/user
/mailtest-failure
47 rm -f /nocow
/user
/mailtest-failure