See #16829
Description
This PR adds a way to set some CLI args with an environment variable.
The syntax for the envvars are BITCOIN_<ARGNAME>=<VALUE>
E.g BITCOIN_DATADIR=/home/emil/bitcoin/
Console arguments override setted envvars.
The envvars are always uppercase.
Testing
Set some envvars On Unix:
export BITCOIN_DATADIR=/path/to/your/datadir
export BITCOIN_CONF=/path/to/your/conf
./bitcoin-qt
This will start Bitcoin-Qt using the datadir path with an english overlay.
List of supported envvars
- datadir
- conf
- <s>blocksdir</s>
- <s>debuclogfile</s>
- <s>includeconf</s>
- <s>loadblock</s>
- <s>pid</s>
- Others can be added by changing one line of code