Skip to content

Commit

Permalink
Fixed CONFIG_PATH issue in testing RUN_MODEs
Browse files Browse the repository at this point in the history
  • Loading branch information
Leopere committed Apr 27, 2019
1 parent 7f3ee7b commit 94b54d7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lbrycrd/stuff/start.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
CONFIG_PATH=/etc/lbry/lbrycrd.conf

function set_config() {
CONFIG_PATH=/etc/lbry/lbrycrd.conf
Expand Down Expand Up @@ -46,6 +47,7 @@ case $RUN_MODE in
regtest )
## Set config params
## TODO: Make this more automagic in the future.
mkdir -p `dirname $CONFIG_PATH`
echo "rpcuser=lbry" > /data/.lbrycrd/lbrycrd.conf
echo "rpcpassword=lbry" >> /data/.lbrycrd/lbrycrd.conf
echo "rpcport=11337" >> /data/.lbrycrd/lbrycrd.conf
Expand All @@ -57,11 +59,12 @@ case $RUN_MODE in
echo "printtoconsole=1" >> /data/.lbrycrd/lbrycrd.conf

#nohup advance &>/dev/null &
lbrycrdd -conf=/data/.lbrycrd/lbrycrd.conf
lbrycrdd -conf=/data/.lbrycrd/lbrycrd.conf $1
;;
testnet )
## Set config params
## TODO: Make this more automagic in the future.
mkdir -p `dirname $CONFIG_PATH`
echo "rpcuser=lbry" > /data/.lbrycrd/lbrycrd.conf
echo "rpcpassword=lbry" >> /data/.lbrycrd/lbrycrd.conf
echo "rpcport=11337" >> /data/.lbrycrd/lbrycrd.conf
Expand All @@ -73,7 +76,7 @@ case $RUN_MODE in
echo "printtoconsole=1" >> /data/.lbrycrd/lbrycrd.conf

#nohup advance &>/dev/null &
lbrycrdd -conf=/data/.lbrycrd/lbrycrd.conf
lbrycrdd -conf=/data/.lbrycrd/lbrycrd.conf $1
;;
* )
echo "Error, you must define a RUN_MODE environment variable."
Expand Down

0 comments on commit 94b54d7

Please sign in to comment.