Description
This PR adds a way to set CLI args with an environment variable.
The syntax for the envvars are BITCOIND_<ARGNAME>=<VALUE>
E.g BITCOIND_DATADIR=/home/emil/bitcoin/
Console arguments override setted envvars.
The envvars are always uppercase.
Testing
Set some envvars On Unix:
0BITCOIND_DATADIR=/path/to/your/datadir
1BITCOIND_LANG=en
2export BITCOIND_DATADIR
3export BITCOIND_LANG
4
5./bitcoin-qt
This will start Bitcoin-Qt using the datadir path with an english overlay.
Notes
This also adds a function to ArgsManager to get all added args in a vector.