X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?p=bin.git;a=blobdiff_plain;f=pull-mail;h=13f48042249d3b8b27061e028ac3ff46ce651f66;hp=c0104d4913bb31a13f3205be079e1f0247ae8339;hb=9cc6305df25e5635e003389504922715fc030209;hpb=11ddadb352831eed98654814b29ee1f5e3f32840 diff --git a/pull-mail b/pull-mail index c0104d4..13f4804 100755 --- a/pull-mail +++ b/pull-mail @@ -1,8 +1,13 @@ #! /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 -bsmtp-pull klecker exit 0