contrib: Support env var in simnet setup script.

This modifies the dcr_tmux_simnet_setup.sh script to set the root of all
of the nodes to the environment variable DCR_SIMNET_ROOT when it is set
and fallback to the existing path when it is not.

It also updates contrib/README.md and docs/simnet_environment.mediawiki
to document the new capability.
This commit is contained in:
Dave Collins 2020-08-12 11:18:33 -05:00
parent 3cb62b9eeb
commit f06d7edfdd
No known key found for this signature in database
GPG Key ID: B8904D9D9C93D1F2
3 changed files with 9 additions and 1 deletions

View File

@ -32,5 +32,9 @@ network where the developer has full control since the difficulty levels are low
enough to generate blocks on demand and the developer owns all of the tickets
and votes on the private network.
The environment will be housed in the `$HOME/dcrdsimnetnodes` directory by
default. This can be overridden with the `DCR_SIMNET_ROOT` environment variable
if desired.
See the full [Simulation Network Reference](../docs/simnet_environment.mediawiki)
for more details.

View File

@ -25,7 +25,7 @@
set -e
SESSION="dcrd-simnet-nodes"
NODES_ROOT=~/dcrdsimnetnodes
NODES_ROOT=${DCR_SIMNET_ROOT:-${HOME}/dcrdsimnetnodes}
RPCUSER="USER"
RPCPASS="PASS"
WALLET_SEED="b280922d2cffda44648346412c5ec97f429938105003730414f10b01e1402eac"

View File

@ -48,6 +48,10 @@ typically readily available on Unix and Linux platforms, to setup a
self-contained environment with several terminal-based windows and panes with
<code>dcrd</code> and <code>dcrwallet</code> already configured.
The environment will be housed in the <code>$HOME/dcrdsimnetnodes</code>
directory by default. This can be overridden with the
<code>DCR_SIMNET_ROOT</code> environment variable if desired.
===2.1 Preconfigured Environment Overview===
The following provides an overview of how the environment that is automatically