From 8ea89606962bd68693ad71d4a88736989661b6e7 Mon Sep 17 00:00:00 2001 From: Dan Sosedoff Date: Tue, 5 Jun 2018 18:58:38 -0500 Subject: [PATCH] Fix killproc func in cockroach smoke test --- script/test_cockroach.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/script/test_cockroach.sh b/script/test_cockroach.sh index 7f92f05..85f9778 100755 --- a/script/test_cockroach.sh +++ b/script/test_cockroach.sh @@ -3,7 +3,9 @@ set -e function killproc() { - lsof -i tcp:8888 | grep pgweb | awk '{print $2}' | uniq | xargs kill + if [[ $(lsof -i tcp:8888) ]]; then + lsof -i tcp:8888 | grep pgweb | awk '{print $2}' | xargs kill + fi } # Nuke the old container if exists.