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:
0export BITCOIN_DATADIR=/path/to/your/datadir
1export BITCOIN_CONF=/path/to/your/conf
2./bitcoin-qt
This will start Bitcoin-Qt using the datadir path with an english overlay.
List of supported envvars
- datadir
- conf
- blocksdir
- debuclogfile
- includeconf
- loadblock
- pid
- Others can be added by changing one line of code