mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-10-09 20:32:52 +02:00
network.wallet: check bitcoin.conf for wallet.dat
related: https://github.com/rootzoll/raspiblitz/issues/1273#issue-642371542
This commit is contained in:
@@ -34,15 +34,27 @@ fi
|
|||||||
# switch on
|
# switch on
|
||||||
###################
|
###################
|
||||||
if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
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
|
||||||
|
restartService=1
|
||||||
|
else
|
||||||
|
echo "Multiwallet is active and wallet.dat is used."
|
||||||
|
restartService=0
|
||||||
|
fi
|
||||||
if [ ${disablewallet} == 1 ]; then
|
if [ ${disablewallet} == 1 ]; then
|
||||||
sudo sed -i "s/^disablewallet=.*/disablewallet=0/g" /mnt/hdd/${network}/${network}.conf
|
sudo sed -i "s/^disablewallet=.*/disablewallet=0/g" /mnt/hdd/${network}/${network}.conf
|
||||||
echo "switching the ${network} core wallet on and restarting ${network}d"
|
echo "Switching the ${network} core wallet on"
|
||||||
sudo systemctl restart ${network}d
|
restartService=1
|
||||||
exit 0
|
|
||||||
else
|
else
|
||||||
echo "The ${network} core wallet is already on"
|
echo "The ${network} core wallet is already on"
|
||||||
exit 0
|
|
||||||
fi
|
fi
|
||||||
|
if [ ${restartService} == 1 ]; then
|
||||||
|
echo "Restarting ${network}d"
|
||||||
|
sudo systemctl restart ${network}d
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user