mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-28 12:36:27 +02:00
fix bitcoin folder
This commit is contained in:
@@ -229,13 +229,17 @@ if [ "$1" = "import" ]; then
|
|||||||
# copy bitcoin/litecoin data backups back to orgplaces (if part of backup)
|
# copy bitcoin/litecoin data backups back to orgplaces (if part of backup)
|
||||||
if [ -d "/mnt/hdd/backup_bitcoin" ]; then
|
if [ -d "/mnt/hdd/backup_bitcoin" ]; then
|
||||||
echo "# Copying back bitcoin backup data .."
|
echo "# Copying back bitcoin backup data .."
|
||||||
|
sudo mkdir /mnt/hdd/bitcoin
|
||||||
sudo cp /mnt/hdd/backup_bitcoin/bitcoin.conf /mnt/hdd/bitcoin/bitcoin.conf
|
sudo cp /mnt/hdd/backup_bitcoin/bitcoin.conf /mnt/hdd/bitcoin/bitcoin.conf
|
||||||
sudo cp /mnt/hdd/backup_bitcoin/wallet.dat /mnt/hdd/bitcoin/wallet.dat 2>/dev/null
|
sudo cp /mnt/hdd/backup_bitcoin/wallet.dat /mnt/hdd/bitcoin/wallet.dat 2>/dev/null
|
||||||
|
sudo chown bitcoin:bitcoin -R /mnt/hdd/bitcoin
|
||||||
fi
|
fi
|
||||||
if [ -d "/mnt/hdd/backup_litecoin" ]; then
|
if [ -d "/mnt/hdd/backup_litecoin" ]; then
|
||||||
echo "# Copying back litecoin backup data .."
|
echo "# Copying back litecoin backup data .."
|
||||||
|
sudo mkdir /mnt/hdd/litecoin
|
||||||
sudo cp /mnt/hdd/backup_litecoin/litecoin.conf /mnt/hdd/litecoin/litecoin.conf
|
sudo cp /mnt/hdd/backup_litecoin/litecoin.conf /mnt/hdd/litecoin/litecoin.conf
|
||||||
sudo cp /mnt/hdd/backup_litecoin/wallet.dat /mnt/hdd/litecoin/wallet.dat 2>/dev/null
|
sudo cp /mnt/hdd/backup_litecoin/wallet.dat /mnt/hdd/litecoin/wallet.dat 2>/dev/null
|
||||||
|
sudo chown bitcoin:bitcoin -R /mnt/hdd/litecoin
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "# OK done - you may now want to:"
|
echo "# OK done - you may now want to:"
|
||||||
@@ -311,11 +315,11 @@ if [ "$1" = "import-gui" ]; then
|
|||||||
|
|
||||||
clear
|
clear
|
||||||
echo
|
echo
|
||||||
echo "**************************"
|
echo "*****************************"
|
||||||
echo "* UPLOAD THE RESCUE FILE *"
|
echo "* UPLOAD THE MIGRATION FILE *"
|
||||||
echo "**************************"
|
echo "*****************************"
|
||||||
echo "If you have a lnd-rescue backup file on your laptop you can now"
|
echo "If you have a migration file on your laptop you can now"
|
||||||
echo "upload it and restore the your latest LND state."
|
echo "upload it and restore on the new HDD/SSD."
|
||||||
echo
|
echo
|
||||||
echo "ON YOUR LAPTOP open a new terminal and change into"
|
echo "ON YOUR LAPTOP open a new terminal and change into"
|
||||||
echo "the directory where your migration file is and"
|
echo "the directory where your migration file is and"
|
||||||
@@ -381,10 +385,9 @@ if [ "$1" = "import-gui" ]; then
|
|||||||
# if there is no blockchain yet - fallback to syncing
|
# if there is no blockchain yet - fallback to syncing
|
||||||
if [ $(sudo ls /mnt/hdd/bitcoin/ 2>/dev/null | grep -c blocks) -eq 0 ]; then
|
if [ $(sudo ls /mnt/hdd/bitcoin/ 2>/dev/null | grep -c blocks) -eq 0 ]; then
|
||||||
echo "Setting Blockchain Data to resync ..."
|
echo "Setting Blockchain Data to resync ..."
|
||||||
sudo mkdir /mnt/hdd/${network} 2>/dev/null
|
|
||||||
sudo -u bitcoin mkdir /mnt/hdd/${network}/blocks 2>/dev/null
|
sudo -u bitcoin mkdir /mnt/hdd/${network}/blocks 2>/dev/null
|
||||||
sudo -u bitcoin mkdir /mnt/hdd/${network}/chainstate 2>/dev/null
|
sudo -u bitcoin mkdir /mnt/hdd/${network}/chainstate 2>/dev/null
|
||||||
sudo touch /mnt/hdd/${network}/blocks/.selfsync
|
sudo -u bitcoin touch /mnt/hdd/${network}/blocks/.selfsync
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "--> Now rebooting and kicking your node in to recovery/update mode ..."
|
echo "--> Now rebooting and kicking your node in to recovery/update mode ..."
|
||||||
|
Reference in New Issue
Block a user