[bin] Fix mail sync scripts
This commit is contained in:
@ -1,7 +1,15 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
AFEW_SERVICE="afew"
|
||||||
|
MBSYNC_SERVICE="mbsync"
|
||||||
|
NOTMUCH_SERVICE="notmuch"
|
||||||
|
|
||||||
afew -m -n
|
if [ $(pidof $AFEW_SERVICE) ] || [ $(pidof $MBSYNC_SERVICE) ] || [ $(pidof $NOTMUCH_SERVICE) ]; then
|
||||||
mbsync -a
|
echo "Checkmail is already running."
|
||||||
notmuch new
|
else
|
||||||
afew -t -n
|
echo "Checking for new mail"
|
||||||
|
afew -m -n
|
||||||
|
mbsync -a
|
||||||
|
notmuch new
|
||||||
|
afew -t -n
|
||||||
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
@ -1,2 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
muchsync muchsync1.local
|
|
||||||
|
if [ $(pidof muchsync) ]; then
|
||||||
|
echo "Checkmail is already running."
|
||||||
|
else
|
||||||
|
echo "Checking for new mail"
|
||||||
|
muchsync muchsync1.local
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user