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