fix pgrep by using --full for checking whole command line for name

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2019-03-01 11:25:49 +01:00
parent 908e80eb0b
commit 5a07956672
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ if [[ -z ${PROC_NAME} ]]; then
fi fi
for ((i = 0; i < ${STEPS}; i += 1)); do for ((i = 0; i < ${STEPS}; i += 1)); do
if pgrep ${PROC_NAME} > /dev/null; then if pgrep -f ${PROC_NAME} > /dev/null; then
echo "Process found. Sleeping ${SLEEP_SEC}..." >&2 echo "Process found. Sleeping ${SLEEP_SEC}..." >&2
sleep ${SLEEP_SEC} sleep ${SLEEP_SEC}
else else