mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-28 16:58:03 +01:00
joinmarket: check for the bitcoin core wallet last (#3752)
This commit is contained in:
parent
158c077dee
commit
4217baa714
1 changed files with 19 additions and 19 deletions
|
@ -159,25 +159,6 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
|||
sudo /home/admin/config.scripts/bonus.joinmarket.sh install
|
||||
fi
|
||||
|
||||
# make sure the Bitcoin Core wallet is on
|
||||
/home/admin/config.scripts/network.wallet.sh on
|
||||
if [ $(/usr/local/bin/bitcoin-cli -conf=/mnt/hdd/bitcoin/bitcoin.conf listwallets | grep -c wallet.dat) -eq 0 ]; then
|
||||
echo "# Create a non-descriptor wallet.dat"
|
||||
/usr/local/bin/bitcoin-cli -conf=/mnt/hdd/bitcoin/bitcoin.conf -named createwallet wallet_name=wallet.dat descriptors=false
|
||||
else
|
||||
isDescriptor=$(/usr/local/bin/bitcoin-cli -conf=/mnt/hdd/bitcoin/bitcoin.conf -rpcwallet=wallet.dat getwalletinfo | grep -c '"descriptors": true,')
|
||||
if [ "$isDescriptor" -gt 0 ]; then
|
||||
# unload
|
||||
bitcoin-cli unloadwallet wallet.dat
|
||||
echo "# Move the wallet.dat with descriptors to /mnt/hdd/bitcoin/descriptors"
|
||||
sudo mv /mnt/hdd/bitcoin/wallet.dat /mnt/hdd/bitcoin/descriptors
|
||||
echo "# Create a non-descriptor wallet.dat"
|
||||
bitcoin-cli -conf=/mnt/hdd/bitcoin/bitcoin.conf -named createwallet wallet_name=wallet.dat descriptors=false
|
||||
else
|
||||
echo "# The non-descriptor wallet.dat is loaded in bitcoind."
|
||||
fi
|
||||
fi
|
||||
|
||||
# store JoinMarket data on HDD
|
||||
mkdir /mnt/hdd/app-data/.joinmarket 2>/dev/null
|
||||
|
||||
|
@ -212,6 +193,25 @@ if [ -z \"\$TMUX\" ]; then
|
|||
fi
|
||||
" | sudo -u joinmarket tee -a /home/joinmarket/.bashrc
|
||||
|
||||
# make sure the Bitcoin Core wallet is on
|
||||
/home/admin/config.scripts/network.wallet.sh on
|
||||
if [ $(/usr/local/bin/bitcoin-cli -conf=/mnt/hdd/bitcoin/bitcoin.conf listwallets | grep -c wallet.dat) -eq 0 ]; then
|
||||
echo "# Create a non-descriptor wallet.dat"
|
||||
/usr/local/bin/bitcoin-cli -conf=/mnt/hdd/bitcoin/bitcoin.conf -named createwallet wallet_name=wallet.dat descriptors=false
|
||||
else
|
||||
isDescriptor=$(/usr/local/bin/bitcoin-cli -conf=/mnt/hdd/bitcoin/bitcoin.conf -rpcwallet=wallet.dat getwalletinfo | grep -c '"descriptors": true,')
|
||||
if [ "$isDescriptor" -gt 0 ]; then
|
||||
# unload
|
||||
bitcoin-cli unloadwallet wallet.dat
|
||||
echo "# Move the wallet.dat with descriptors to /mnt/hdd/bitcoin/descriptors"
|
||||
sudo mv /mnt/hdd/bitcoin/wallet.dat /mnt/hdd/bitcoin/descriptors
|
||||
echo "# Create a non-descriptor wallet.dat"
|
||||
bitcoin-cli -conf=/mnt/hdd/bitcoin/bitcoin.conf -named createwallet wallet_name=wallet.dat descriptors=false
|
||||
else
|
||||
echo "# The non-descriptor wallet.dat is loaded in bitcoind."
|
||||
fi
|
||||
fi
|
||||
|
||||
# configure joinmarket (includes a check if it is installed)
|
||||
if sudo -u joinmarket /home/joinmarket/start.joininbox.sh; then
|
||||
echo "# Start to use by logging in to the 'joinmarket' user with:"
|
||||
|
|
Loading…
Add table
Reference in a new issue