Set timeout for the Mail Connections.

This commit is contained in:
Kolan Sh 2014-09-26 16:53:21 +04:00
parent 22477f02fd
commit 49e43b0cc2
1 changed files with 5 additions and 3 deletions

View File

@ -2,13 +2,15 @@
# mymail_gmail_loop.sh # mymail_gmail_loop.sh
MAILDIR=/tmp/$USERNAME-mail_loop MAILDIR=/tmp/$USERNAME-mail_loop
mkdir --mode=700 $MAILDIR mkdir --mode=700 $MAILDIR 2>/dev/null
while [ 1 ]; do while [ 1 ]; do
val=$(~/.config/awesome/mail_loop_mymail.py) val=$(timeout -k 30 25 ~/.config/awesome/mail_loop_mymail.py)
if [[ "$val" == "" ]]; then val = "?"; fi
echo $val > $MAILDIR/mymail_count echo $val > $MAILDIR/mymail_count
sleep 30 sleep 30
val=$(~/.config/awesome/mail_loop_gmail.py) val=$(timeout -k 30 25 ~/.config/awesome/mail_loop_gmail.py)
if [[ "$val" == "" ]]; then val = "?"; fi
echo $val > $MAILDIR/gmail_count echo $val > $MAILDIR/gmail_count
sleep 30 sleep 30
done done