X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?p=bin.git;a=blobdiff_plain;f=pull-mail;h=13f48042249d3b8b27061e028ac3ff46ce651f66;hp=828ec374f8e5a14e529ab9946c5cee090473f9e1;hb=f93ca66f0cf1c01bac169d1e17f6c59fff959094;hpb=6ea4695e2caa421e8a367ea6fe414a12fa0f0f34 diff --git a/pull-mail b/pull-mail index 828ec37..13f4804 100755 --- a/pull-mail +++ b/pull-mail @@ -1,5 +1,11 @@ #! /bin/sh +loadavg="$(cut -d. -f1 /proc/loadavg)" +if [ "$loadavg" -ge 5 ]; then + # System load is too high. Don't contribute to it. + exit 0 +fi + date >> ~/.fetchmail/log fetchmail >> ~/.fetchmail/log bsmtp-pull gluck