From 5a079566725f12f388418a2f7fad346cfccec909 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Fri, 1 Mar 2019 11:25:49 +0100 Subject: [PATCH] fix pgrep by using --full for checking whole command line for name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- scripts/wait-for.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/wait-for.sh b/scripts/wait-for.sh index 4626ca5a4b..b22422c42f 100755 --- a/scripts/wait-for.sh +++ b/scripts/wait-for.sh @@ -13,7 +13,7 @@ if [[ -z ${PROC_NAME} ]]; then fi 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 sleep ${SLEEP_SEC} else