chiark / gitweb /
add ubuntu-make-mergelog convenience wrapper around dch
[bin.git] / pull-mail
index 828ec374f8e5a14e529ab9946c5cee090473f9e1..13f48042249d3b8b27061e028ac3ff46ce651f66 100755 (executable)
--- 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