From 8eb9d69fa39f66480530efdec3d9a2efb5497f74 Mon Sep 17 00:00:00 2001
From: cgeek <cem.moreau@gmail.com>
Date: Sat, 5 Dec 2015 16:52:01 +0100
Subject: [PATCH] Fix #251 Nodejs was required in PATH

---
 ucoin.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/ucoin.sh b/ucoin.sh
index 8533c1b86..ed820e964 100755
--- a/ucoin.sh
+++ b/ucoin.sh
@@ -47,10 +47,10 @@ ucoind() {
 		if [ -z $UCOIN_DATABASE ]; then
 			UCOIN_DATABASE="ucoin_default"
 		fi
-		test=`$PM2 list | grep "$UCOIN_DATABASE.*online"`
+		test=`$NODE $PM2 list | grep "$UCOIN_DATABASE.*online"`
 		if [ -z "$test" ]; then
 		echo $UCOIN_LOG_FILE
-			$PM2 start -f "$UCOIN_DIR/bin/ucoind" --name "$UCOIN_DATABASE" --interpreter="$NODE" --node-args="--harmony" --log $UCOIN_LOG_FILE --error $UCOIN_ERR_FILE --merge-logs -- start --mdb "$UCOIN_DATABASE" --httplogs 2>/dev/null
+			$NODE $PM2 start -f "$UCOIN_DIR/bin/ucoind" --name "$UCOIN_DATABASE" --interpreter="$NODE" --node-args="--harmony" --log $UCOIN_LOG_FILE --error $UCOIN_ERR_FILE --merge-logs -- start --mdb "$UCOIN_DATABASE" --httplogs 2>/dev/null
 			echo "uCoin with DB '$UCOIN_DATABASE' started. Use 'ucoind logs' to see interactive logs."
 		else
 			echo 1>&2 "uCoin '$UCOIN_DATABASE' already started."
@@ -70,11 +70,11 @@ ucoind() {
 		if [ -z $UCOIN_DATABASE ]; then
 			UCOIN_DATABASE="ucoin_default"
 		fi
-	  $PM2 $1 $UCOIN_DATABASE
+	  $NODE $PM2 $1 $UCOIN_DATABASE
 		;;
 
 		delete-all)
-	  $PM2 delete all
+	  $NODE $PM2 delete all
 		;;
 
 		#---------------------------------
-- 
GitLab