From aff973f5a9c48b599df6bd92930d1e1f3fbc7559 Mon Sep 17 00:00:00 2001 From: Leopere <1068374+Leopere@users.noreply.github.com> Date: Wed, 17 Apr 2019 10:38:56 -0400 Subject: [PATCH] Clarification on comments and TODO: cleanups. Documented the RUN_MODEs and just did some re-organizing. --- lbrycrd/stuff/start.sh | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/lbrycrd/stuff/start.sh b/lbrycrd/stuff/start.sh index 6b6a41c..49abf46 100755 --- a/lbrycrd/stuff/start.sh +++ b/lbrycrd/stuff/start.sh @@ -1,13 +1,5 @@ #!/usr/bin/env bash -# ## ToDo: Get a test case to see if this is the first run or a repeat run. -# ## If it's a first run you need to do a full index including all transactions -# ## tx index creates an index of every single transaction in the block history if -# ## not specified it will only create an index for transactions that are related to the wallet or have unspent outputs. -# ## This is specific to chainquery. - -# The config file does not exist in the container image. It must be mounted, or -# if not, a default config is generated using environment variables. CONFIG_PATH=/etc/lbry/lbrycrd.conf if [ -f "$CONFIG_PATH" ] then @@ -27,15 +19,22 @@ fi ## Ensure perms are correct prior to running main binary /usr/bin/fix-permissions -## Control this invocation through envvar. +## You can optionally specify a run mode if you want to use lbry defined presets for compatibility. case $RUN_MODE in default ) lbrycrdd -server -conf=$CONFIG_PATH -printtoconsole ;; +## If it's a first run you need to do a full index including all transactions +## tx index creates an index of every single transaction in the block history if +## not specified it will only create an index for transactions that are related to the wallet or have unspent outputs. +## This is generally specific to chainquery. reindex ) + ## Apply this RUN_MODE in the case you need to update a dataset. NOTE: you do not need to use `RUN_MODE reindex` for more than one complete run. lbrycrdd -server -txindex -reindex -conf=$CONFIG_PATH -printtoconsole ;; chainquery ) + ## If your only goal is to run Chainquery against this instance of lbrycrd and you're starting a + ## fresh local dataset use this run mode. lbrycrdd -server -txindex -conf=$CONFIG_PATH -printtoconsole ;; esac