diff --git a/.config/mail/mail-indicator.sh b/.config/mail/mail-indicator.sh index a4f76514..b654163b 100755 --- a/.config/mail/mail-indicator.sh +++ b/.config/mail/mail-indicator.sh @@ -5,8 +5,11 @@ PIPE="/tmp/email_refresh_pipe" # COUNT="/tmp/email_count" +if [ -f /tmp/email_indicator_lock ]; then + exit 1 +fi # Create pipe if doesn't exist -[[ -p "$PIPE" ]] || mkfifo "$PIPE" +[[ -p "$PIPE" ]] || mkfifo "$PIPE" && touch /tmp/email_indicator_lock # if [ ! -e "$COUNT" ]; then # echo "0" > "$COUNT"