From d5886da0a4591ac796c1b3363b9d1c2740052919 Mon Sep 17 00:00:00 2001 From: paspo Date: Tue, 15 Oct 2024 09:20:15 +0200 Subject: [PATCH] fix exact grep --- btrbk-cron | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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