Browse Source

change the pgrep line

pull/323/head^2
Wayne Reeves 4 years ago
parent
commit
5029011952
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      bin/mailsync

+ 1
- 1
bin/mailsync View File

@@ -8,7 +8,7 @@ export DISPLAY=:0.0
[ -d "$HOME/.local/share/password-store" ] && export PASSWORD_STORE_DIR="$HOME/.local/share/password-store" [ -d "$HOME/.local/share/password-store" ] && export PASSWORD_STORE_DIR="$HOME/.local/share/password-store"


# Run only if user logged in (prevent cron errors) # 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 # Run only if not already running in other instance
pgrep -x mbsync >/dev/null && { echo "mbsync is already running." ; exit ;} pgrep -x mbsync >/dev/null && { echo "mbsync is already running." ; exit ;}




Loading…
Cancel
Save