From 7c94b8f009cf0596e431be8be5af5f02e6a9eda0 Mon Sep 17 00:00:00 2001 From: Nakul Manchanda Date: Wed, 10 Apr 2019 13:34:15 -0400 Subject: [PATCH] some unix system use outputs port in column 2 Signed-off-by: Nakul Manchanda --- scripts/restart-sample-node-api.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/restart-sample-node-api.sh b/scripts/restart-sample-node-api.sh index dc4d5cc..0fac171 100644 --- a/scripts/restart-sample-node-api.sh +++ b/scripts/restart-sample-node-api.sh @@ -1,6 +1,7 @@ #!/bin/sh echo 'restarting sample node api...' +# ps -elf | awk '/node/ && /app.js/ && !/sh -c/' | awk '{print $2}' | xargs kill -9 $1 ps -elf | awk '/node/ && /app.js/ && !/sh -c/' | awk '{print $3}' | xargs kill -9 $1 ./start-sample-node-api.sh sleep 30