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=7e1a2a6293aec46c8d389fdc9564c2f334deb216;hpb=8c8342151d388db43efcaeec44d82c2d1c835f1e 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