diff --git a/btrbk-cron b/btrbk-cron index fe8d014..3b1615a 100755 --- a/btrbk-cron +++ b/btrbk-cron @@ -40,7 +40,7 @@ fi # lockfile check if [[ -f "${LOCKFILE}" ]] ; then # check if stale lockfile - if [[ $(pgrep -c btrbk || true) -eq 0 ]] ; then + if [[ $(pgrep --exact --count btrbk || true) -eq 0 ]] ; then echo "Removing stale lock file: ${LOCKFILE}" rm "${LOCKFILE}" else