Files
sample-node-api/scripts/restart-sample-node-api.sh
Nakul Manchanda 7c94b8f009 some unix system use outputs port in column 2
Signed-off-by: Nakul Manchanda <nakul.manchanda@ibm.com>
2019-04-10 13:34:15 -04:00

8 lines
291 B
Bash

#!/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
echo 'restart sample node api done'