mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-18 19:50:35 +02:00
#397 rsync for MacOS and Linux
This commit is contained in:
@@ -19,6 +19,21 @@ if [ "${setupStep}" = "100" ]; then
|
|||||||
sudo cp -f /mnt/hdd/bitcoin/bitcoin.conf /home/admin/assets/bitcoin.conf
|
sudo cp -f /mnt/hdd/bitcoin/bitcoin.conf /home/admin/assets/bitcoin.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Basic Options
|
||||||
|
OPTIONS=(UNIX "MacOS or Linux" \
|
||||||
|
WINDOWS "Windows" \
|
||||||
|
BLITZ "RaspiBlitz" \
|
||||||
|
)
|
||||||
|
|
||||||
|
CHOICE=$(dialog --clear --title "Which System is running on the other computer?" --menu "" 11 40 6 "${OPTIONS[@]}" 2>&1 >/dev/tty)
|
||||||
|
|
||||||
|
clear
|
||||||
|
case $CHOICE in
|
||||||
|
CLOSE)
|
||||||
|
exit 1;
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
# delete all IN bitcoin directory but not itself if it exists
|
# delete all IN bitcoin directory but not itself if it exists
|
||||||
# so that possibel link to /home/bitcoin/.bitcoin nicht beschädigt wird
|
# so that possibel link to /home/bitcoin/.bitcoin nicht beschädigt wird
|
||||||
sudo rm -rfv /mnt/hdd/bitcoin/* 2>/dev/null
|
sudo rm -rfv /mnt/hdd/bitcoin/* 2>/dev/null
|
||||||
@@ -26,7 +41,7 @@ sudo rm -rfv /mnt/hdd/bitcoin/* 2>/dev/null
|
|||||||
# make sure /mnt/hdd/bitcoin exists
|
# make sure /mnt/hdd/bitcoin exists
|
||||||
sudo mkdir /mnt/hdd/bitcoin 2>/dev/null
|
sudo mkdir /mnt/hdd/bitcoin 2>/dev/null
|
||||||
|
|
||||||
# allow all users write to it ()
|
# allow all users write to it
|
||||||
sudo chmod 777 /mnt/hdd/bitcoin
|
sudo chmod 777 /mnt/hdd/bitcoin
|
||||||
|
|
||||||
clear
|
clear
|
||||||
@@ -45,7 +60,11 @@ echo "blockchain data. You should see directories 'blocks', 'chainstate' & 'inde
|
|||||||
echo "Make sure the bitcoin client on that computer is stopped."
|
echo "Make sure the bitcoin client on that computer is stopped."
|
||||||
echo ""
|
echo ""
|
||||||
echo "COPY, PASTE & EXECUTE the following command on the blockchain source computer:"
|
echo "COPY, PASTE & EXECUTE the following command on the blockchain source computer:"
|
||||||
echo "sudo scp -r ./chainstate ./indexes ./testnet3 ./blocks bitcoin@${localip}:/mnt/hdd/bitcoin"
|
if [ "${CHOICE}" = "WINDOWS" ]; then
|
||||||
|
echo "sudo scp -r ./chainstate ./indexes ./blocks bitcoin@${localip}:/mnt/hdd/bitcoin"
|
||||||
|
else
|
||||||
|
echo "sudo rsync -avhW --progress ./chainstate ./indexes ./blocks bitcoin@${localip}:/mnt/hdd/bitcoin"
|
||||||
|
fi
|
||||||
echo ""
|
echo ""
|
||||||
echo "This command may ask you first about the admin password of the other computer (because sudo)."
|
echo "This command may ask you first about the admin password of the other computer (because sudo)."
|
||||||
echo "Then it will ask for your SSH PASSWORD A from this RaspiBlitz."
|
echo "Then it will ask for your SSH PASSWORD A from this RaspiBlitz."
|
||||||
|
Reference in New Issue
Block a user