Browse Source

Add mail synchronisation script, sequencial version

master
lhark 7 years ago
parent
commit
3ad6614284
  1. 20
      mailsync

20
mailsync

@ -0,0 +1,20 @@
#!/bin/sh
# Temp disable
#exit 0
if pgrep -x mbsync > /dev/null ; then
>&2 echo "Isync is already running, aborting..."
exit 1
fi
timeout 10m mbsync -a
if [ "$?" -eq 124 ];then
>&2 echo "Command mbync -a timed out"
elif [ "$?" -eq 0 ];then
>&2 echo "Successful mail synchronisation"
else
>&2 echo "Isync exited with status $?"
fi
fdm fetch
notmuch new
Loading…
Cancel
Save