.awesome/mail_loop.sh

17 lines
429 B
Bash
Raw Normal View History

#!/bin/bash
# mymail_gmail_loop.sh
MAILDIR=/tmp/$USERNAME-mail_loop
2014-09-26 16:53:21 +04:00
mkdir --mode=700 $MAILDIR 2>/dev/null
while [ 1 ]; do
2014-09-26 16:53:21 +04:00
val=$(timeout -k 30 25 ~/.config/awesome/mail_loop_mymail.py)
if [[ "$val" == "" ]]; then val = "?"; fi
echo $val > $MAILDIR/mymail_count
sleep 30
2014-09-26 16:53:21 +04:00
val=$(timeout -k 30 25 ~/.config/awesome/mail_loop_gmail.py)
if [[ "$val" == "" ]]; then val = "?"; fi
echo $val > $MAILDIR/gmail_count
sleep 30
done