X-Git-Url: https://git.madduck.net/etc/offlineimap.git/blobdiff_plain/7c0900182487367b083ce03452b521d3e7d87812..5cecd9d4f8fa6e865e29b31235b575665b261540:/.bin/offlineimap diff --git a/.bin/offlineimap b/.bin/offlineimap index ae82806..d1f81c0 100755 --- a/.bin/offlineimap +++ b/.bin/offlineimap @@ -7,7 +7,7 @@ VAR=$HOME/.var/offlineimap LOCKFILE="$VAR/.cron.lock" trapfn() { rm -f "$LOCKFILE"; trap - 0 1 2 3 4 5 6 7 8 10 11 12 13 14 15; } trap trapfn 1 2 3 4 5 6 7 8 10 11 12 13 14 15 -if ! lockfile -0 -r0 -l 3600 "$LOCKFILE" 2>/dev/null; then +if [ -d "$VAR" ] && ! lockfile -0 -r0 -l 3600 "$LOCKFILE" 2>/dev/null; then echo "E: offlineimap is already running." >&2 exit 1 fi @@ -21,7 +21,7 @@ if ! test -t 0; then fi ret=0 -/usr/bin/offlineimap "$@" || ret=$? +strace -tfo /tmp/offlineimap.strace /usr/bin/offlineimap "$@" || ret=$? trapfn exit $ret