Merge pull request #295 from greggzigler/bug/prevent-double-npm-start
make sure pidfiles correspond to running instances of bws
This commit is contained in:
commit
2c9e36a21b
6
start.sh
6
start.sh
|
@ -10,6 +10,12 @@ run_program ()
|
||||||
pidfile=$2
|
pidfile=$2
|
||||||
logfile=$3
|
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 &
|
nohup node $nodefile >> $logfile 2>&1 &
|
||||||
PID=$!
|
PID=$!
|
||||||
if [ $? -eq 0 ]
|
if [ $? -eq 0 ]
|
||||||
|
|
Loading…
Reference in New Issue