From: martin f. krafft Date: Fri, 13 Aug 2010 13:10:58 +0000 (+0200) Subject: shut up offlineimap during normal cron runs X-Git-Url: https://git.madduck.net/etc/offlineimap.git/commitdiff_plain/84ad23ae0edb52bd785a38ef87398133e73c41e2 shut up offlineimap during normal cron runs --- diff --git a/.bin/offlineimap b/.bin/offlineimap index 5bf7e52..f55fee5 100755 --- a/.bin/offlineimap +++ b/.bin/offlineimap @@ -1,6 +1,8 @@ #!/bin/sh set -eu +[ "${1:-}" = -q ] && exec >/dev/null + VAR=$HOME/.var/offlineimap LOCKFILE="$VAR/.cron.lock" trap "rm -f $LOCKFILE" 0 1 2 3 4 5 6 7 8 10 11 12 13 14 15 diff --git a/.crontab.d/offlineimap b/.crontab.d/offlineimap index 6c49698..d2e4061 100644 --- a/.crontab.d/offlineimap +++ b/.crontab.d/offlineimap @@ -1,3 +1,3 @@ -*/30 * * * * sleep $((900 * $RANDOM / 32768)) && ip r | grep -q via && $HOME/.bin/offlineimap -38 */4 * * * sleep $((60 * $RANDOM / 32768)) && ip r | grep -q via && $HOME/.bin/offlineimap -a logcheck -55 */8 * * * sleep $((300 * $RANDOM / 32768)) && ip r | grep -q via && $HOME/.bin/offlineimap -a madduck.net-bulk +*/30 * * * * sleep $((900 * $RANDOM / 32768)) && ip r | grep -q via && $HOME/.bin/offlineimap -q +38 */4 * * * sleep $((60 * $RANDOM / 32768)) && ip r | grep -q via && $HOME/.bin/offlineimap -q -a logcheck +55 */8 * * * sleep $((300 * $RANDOM / 32768)) && ip r | grep -q via && $HOME/.bin/offlineimap -q -a madduck.net-bulk