diff --git a/ucoin.sh b/ucoin.sh index 8533c1b86dfc95822085bcb9722b866ff5f3ed55..ed820e96457697889aa8f408e582f1185bdb7fde 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 ;; #---------------------------------