21 lines
375 B
Text
21 lines
375 B
Text
|
#!/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
|