summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKr1ss <kr1ss.x@yandex.com>2019-05-07 14:39:01 +0200
committerKr1ss <kr1ss.x@yandex.com>2019-05-07 14:39:01 +0200
commitc56b1396141b604ee3aa1e5a4f675ff62f137b79 (patch)
tree8151e6e8a09aece1a042e462146129fb584e56f8
parentc5e12600b919a9bebfb14c12421b4ab6d742a785 (diff)
mailsync: fix early exit on graphical(-only) login
Resolves https://github.com/LukeSmithxyz/mutt-wizard/issues/197.
-rwxr-xr-xbin/mailsync2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/mailsync b/bin/mailsync
index 8ae8758..43429f5 100755
--- a/bin/mailsync
+++ b/bin/mailsync
@@ -2,7 +2,7 @@
# Sync mail and give notification if there is new mail.
# Run only if user logged in (prevent cron errors)
-w | grep "^$USER\W" >/dev/null || exit
+pgrep -cu "$USER" >/dev/null || exit
# Checks for internet connection and set notification script.
ping -q -c 1 1.1.1.1 > /dev/null || exit