17 lines
390 B
Bash
Executable File
17 lines
390 B
Bash
Executable File
#!/bin/sh
|
|
AFEW_SERVICE="afew"
|
|
MBSYNC_SERVICE="mbsync"
|
|
NOTMUCH_SERVICE="notmuch"
|
|
|
|
if [ $(pidof $AFEW_SERVICE) ] || [ $(pidof $MBSYNC_SERVICE) ] || [ $(pidof $NOTMUCH_SERVICE) ]; then
|
|
echo "Checkmail is already running."
|
|
else
|
|
echo "Checking for new mail"
|
|
mkdir -p ~/Mail/colin@unbl.ink/Junk/{cur,new,tmp}
|
|
mbsync unblink
|
|
notmuch new
|
|
afew -t -n
|
|
afew -m -n
|
|
fi
|
|
exit 0
|