commit 71703f8f55e3e3fb151fb8b0c7615d570597c439
parent c5e12600b919a9bebfb14c12421b4ab6d742a785
Author: Luke Smith <luke@lukesmith.xyz>
Date: Tue, 7 May 2019 09:40:03 -0400
Merge pull request #200 from Kr1ss-XD/master
mailsync: fix early exit on graphical(-only) login
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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