chiark / gitweb /
pull-mail: add --force option; extend running times
authorColin Watson <cjwatson@chiark.greenend.org.uk>
Mon, 18 Feb 2013 17:48:06 +0000 (17:48 +0000)
committerColin Watson <cjwatson@chiark.greenend.org.uk>
Mon, 18 Feb 2013 17:48:06 +0000 (17:48 +0000)
pull-mail

index 9653250..2a33895 100755 (executable)
--- a/pull-mail
+++ b/pull-mail
@@ -5,16 +5,16 @@ if [ -f ~/.nomail ] && [ "$1" != --force ]; then
 fi
 
 loadavg="$(cut -d. -f1 /proc/loadavg)"
-if [ "$loadavg" -ge 5 ]; then
+if [ "$loadavg" -ge 5 ] && [ "$1" != --force ]; then
        # System load is too high. Don't contribute to it.
        exit 0
 fi
 
-bsmtp-pull gluck
+bsmtp-pull master
 
 hour="$(date +%H)"
 case $hour in
-    0[0-289]|[12]*)
+    0[0-4789]|[12]*)
        date >> ~/.fetchmail/log
        fetchmail >> ~/.fetchmail/log
        logrotate -s ~/.fetchmail/logrotate.status ~/.fetchmail/logrotate.conf