fix exact grep

This commit is contained in:
Paolo Asperti 2024-10-15 09:20:15 +02:00
parent 784cda10eb
commit d5886da0a4
Signed by: paspo
GPG Key ID: 06D46905D19D5182

View File

@ -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