[bin] Fix mail sync scripts

This commit is contained in:
2022-10-26 10:40:00 -04:00
parent f9ca961f1b
commit d7ae82cb1a
2 changed files with 20 additions and 6 deletions

View File

@ -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

View File

@ -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