checkmail: don't error when unable to connect

This commit is contained in:
lelgenio 2021-05-21 01:26:17 -03:00
parent a0ef647449
commit d9bac9d0b7
1 changed files with 6 additions and 1 deletions

View File

@ -1,7 +1,8 @@
#!/bin/sh #!/bin/sh
set -e set -e
if test -z "$SWAYSOCK" && pidof gnome-shell; then if test -z "$SWAYSOCK" && pidof gnome-shell &> /dev/null
then
exit 0 exit 0
fi fi
@ -27,6 +28,10 @@ getnew() {
OLD=$(getnew) OLD=$(getnew)
if test "$1" = "update" && ! pidof mbsync; then if test "$1" = "update" && ! pidof mbsync; then
if ! ping -c3 {{@@ mail.personal.mail @@}} &> /dev/null
then
exit 0
fi
mbsync -a || mbsync -a ||
mbsync -a || mbsync -a ||
mbsync -a mbsync -a