diff options
author | Kr1ss <kr1ss.x@yandex.com> | 2021-06-15 20:14:18 +0200 |
---|---|---|
committer | Kr1ss <kr1ss.x@yandex.com> | 2021-06-15 20:14:18 +0200 |
commit | b9a95a055a5737c7765c2d21451d504c9818ba80 (patch) | |
tree | e3a31532f88b051bdeadac10c6abcbe4c36ba05e /bin/mailsync | |
parent | 36788d9c439729f97edda2aba75bf477f029dca2 (diff) |
patch mailsync on macOS; fixes #725
The macOS version of `pidof` doesn't implement the `-s` flag.
Diffstat (limited to 'bin/mailsync')
-rwxr-xr-x | bin/mailsync | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/mailsync b/bin/mailsync index f739584..a026354 100755 --- a/bin/mailsync +++ b/bin/mailsync @@ -14,7 +14,7 @@ # Run only if user logged in (prevent cron errors) 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 -pidof -s mbsync >/dev/null && { echo "mbsync is already running." ; exit ;} +pidof $([ $(uname) != Darwin ] && echo '-s') mbsync >/dev/null && { echo "mbsync is already running."; exit ;} # First, we have to get the right variables for the mbsync file, the pass # archive, notmuch and the GPG home. This is done by searching common profile |