summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorWayne Reeves <darthwayne@hotmail.com>2019-11-07 12:37:21 -0600
committerWayne Reeves <darthwayne@hotmail.com>2019-11-07 12:37:21 -0600
commit50290119526d54dfe0e8888a48d1d05d173dec37 (patch)
tree3690a8aeccbbdff3130e2f0aa6b215173826c5d0 /bin
parentca64a6ae56a31ead28cc638d8d8dac7e28f9df68 (diff)
change the pgrep line
Diffstat (limited to 'bin')
-rwxr-xr-xbin/mailsync2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/mailsync b/bin/mailsync
index 4677d3b..c56ccb2 100755
--- a/bin/mailsync
+++ b/bin/mailsync
@@ -8,7 +8,7 @@ export DISPLAY=:0.0
[ -d "$HOME/.local/share/password-store" ] && export PASSWORD_STORE_DIR="$HOME/.local/share/password-store"
# Run only if user logged in (prevent cron errors)
-pgrep -u "$USER" >/dev/null || { echo "$USER not logged in; sync will not run."; exit ;}
+pgrep -u "${USER:=$LOGNAME}" >/dev/null || { echo "$USER not logged in; sync will not run."; exit ;}
# Run only if not already running in other instance
pgrep -x mbsync >/dev/null && { echo "mbsync is already running." ; exit ;}