Merge pull request #1328 from openoms/testnet-fixes

testnet: fix bitcoind wallet setting
This commit is contained in:
Christian Rotzoll 2020-07-12 18:06:43 +02:00 committed by GitHub
commit 6526a1cd56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,9 +36,11 @@ fi
###################
if [ "$1" = "1" ] || [ "$1" = "on" ]; then
if ! grep -Eq "^wallet=wallet.dat" /mnt/hdd/${network}/${network}.conf; then
echo "Enable the multiwallet feature in ${network} core and specify wallet.dat"
echo "wallet=wallet.dat" | sudo tee -a /mnt/hdd/${network}/${network}.conf >/dev/null
# specify wallet.dat for mainnet to avoid error on testnet
sudo sed -i "s/^wallet=wallet.dat/main.wallet=wallet.dat/g" /mnt/hdd/${network}/${network}.conf
if ! grep -Eq "^${chain}.wallet=wallet.dat" /mnt/hdd/${network}/${network}.conf; then
echo "Enable the multiwallet feature in ${network} core ${chain}net and specify wallet.dat"
echo "${chain}.wallet=wallet.dat" | sudo tee -a /mnt/hdd/${network}/${network}.conf >/dev/null
restartService=1
else
echo "Multiwallet is active and wallet.dat is used."