diff options
author | Steve McIntyre <steve@einval.com> | 2023-10-29 17:14:41 +0000 |
---|---|---|
committer | Steve McIntyre <steve@einval.com> | 2023-10-29 17:18:05 +0000 |
commit | c5b18ffe1d021ebce203902783edb93e3f56ebaa (patch) | |
tree | ca8f8cebb1d073cfbd3e5c0ad7c48a81d6228add | |
parent | f777d940bf658fd6041c44ddc95167f0f052f858 (diff) | |
download | steve-scripts-c5b18ffe1d021ebce203902783edb93e3f56ebaa.zip |
my_mailsync: run offlineimap inside an schroot container
-rwxr-xr-x | my_mailsync | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/my_mailsync b/my_mailsync index 36d0f5a..989a2d4 100755 --- a/my_mailsync +++ b/my_mailsync @@ -20,6 +20,8 @@ for CONFIG in $KNOWN_CONFIGS; do esac done +SCHROOT="schroot -c buster-offlineimap --" + UI="Quiet" VERBOSE=0 MAX_RUN=600 # Seconds @@ -64,9 +66,9 @@ if [ $VERBOSE -gt 1 ] ; then fi if [ "$TTY"x = "not a tty"x ] ; then # No terminal, so running from cron or similar - schroot -c buster-offlineimap -- timeout -k $MAX_RUN $MAX_RUN offlineimap -u $UI -o -c ~/.offlineimap/config/$CONF 2>&1 + $SCHROOT timeout -k $MAX_RUN $MAX_RUN offlineimap -u $UI -o -c ~/.offlineimap/config/$CONF 2>&1 else - schroot -c buster-offlineimap -- offlineimap -u $UI -o $DEBUG -c ~/.offlineimap/config/$CONF 2>&1 + $SCHROOT offlineimap -u $UI -o $DEBUG -c ~/.offlineimap/config/$CONF 2>&1 if [ $? -ne 0 ] ; then echo echo |