From 24c79119f1eec0e2019e1ba5c5caa2d62273f4ca Mon Sep 17 00:00:00 2001 From: Gregg Zigler Date: Mon, 20 Jul 2015 11:56:57 -0700 Subject: [PATCH] make sure pidfiles correspond to running version of bws --- start.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/start.sh b/start.sh index 454ff1d..f979313 100755 --- a/start.sh +++ b/start.sh @@ -10,6 +10,12 @@ run_program () pidfile=$2 logfile=$3 + if [ -e "$pidfile" ] + then + echo "$nodefile is already running. Run 'npm stop' if you wish to restart." + return 0 + fi + nohup node $nodefile >> $logfile 2>&1 & PID=$! if [ $? -eq 0 ]