mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-25 11:13:12 +02:00
debug migration
This commit is contained in:
@@ -84,24 +84,12 @@ if [ ${bitcoinActive} -eq 0 ] || [ ${#bitcoinErrorFull} -gt 0 ] || [ "${1}" == "
|
||||
echo
|
||||
fi
|
||||
|
||||
echo "POSSIBLE OPTIONS:"
|
||||
# check if maybe problems with txindex
|
||||
source <(/home/admin/config.scripts/network.txindex.sh status)
|
||||
if [ "${txindex}" == "1" ]; then
|
||||
if [ "${indexFinished}" == "0" ]; then
|
||||
# bitcoind is not starting while still building index - recommend turning off index and restart
|
||||
whiptail --title "Problems with Bitcoin Index" --yes-button "TurnOff TxIndex" --no-button "Do Nothing" --yesno "It looks like ${network}d has problems building the txindex. Turning Off the txindex and restart is recommended." 10 60
|
||||
if [ $? -eq 0 ]; then
|
||||
# delete txindex, turn off and deactivate apps needed index
|
||||
sudo /home/admin/config.scripts/network.txindex.sh delete
|
||||
whiptail --msgbox "OK txindex was turned off.\n\nTo be able to build a valid txindex in the future you might need to reset/redownload the blockchain." 10 56 "" --title " TXINDEX OFF "
|
||||
/home/admin/XXshutdown.sh reboot
|
||||
fi
|
||||
else
|
||||
# bitcoind is not starting but index was build in the past - recommend repair with turning off index
|
||||
echo "-> Use command 'repair' and then choose 'DELETE-INDEX' to try rebuilding transaction index."
|
||||
fi
|
||||
echo "-> Use command 'repair' and then choose 'DELETE-INDEX' to try rebuilding transaction index."
|
||||
fi
|
||||
|
||||
echo "-> Use command 'repair' and then choose 'RESET-CHAIN' to try downloading new blockchain."
|
||||
echo "-> Use command 'debug' for more log output you can use for getting support."
|
||||
echo "-> Use command 'menu' to open main menu."
|
||||
|
@@ -151,6 +151,8 @@ if [ "$1" = "export-gui" ]; then
|
||||
echo "To complete the data migration follow then instructions on the github FAQ."
|
||||
echo
|
||||
read key
|
||||
echo "Shutting down ...."
|
||||
sleep 4
|
||||
/home/admin/XXshutdown.sh
|
||||
exit 0
|
||||
fi
|
||||
@@ -257,7 +259,7 @@ if [ "$1" = "import-gui" ]; then
|
||||
# make sure HDD/SSD is not mounted
|
||||
# because importing migration just works during early setup
|
||||
if [ ${isMounted} -eq 1 ]; then
|
||||
echo "FAIL --> cannot import migration data when HDD(SDD is mounted"
|
||||
echo "FAIL --> cannot import migration data when HDD/SSD is mounted"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -273,10 +275,18 @@ if [ "$1" = "import-gui" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# ask format for new HDD/SSD
|
||||
OPTIONS=(EXT4 "Ext4 & 1 Partition (default)" \
|
||||
BTRFS "BTRFS & 3 Partitions (experimental)"
|
||||
)
|
||||
|
||||
# check if HDD/SSD contains Bitcoin Blockchain
|
||||
if [ "${hddBlocksBitcoin}" == "1" ]; then
|
||||
OPTIONS+=(CLEAN "Just clean HDD & use Blockchain")
|
||||
fi
|
||||
|
||||
CHOICE=$(whiptail --clear --title "Formatting ${hddCandidate}" --menu "" 9 52 2 "${OPTIONS[@]}" 2>&1 >/dev/tty)
|
||||
clear
|
||||
case $CHOICE in
|
||||
@@ -296,6 +306,10 @@ if [ "$1" = "import-gui" ]; then
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
CLEAN)
|
||||
echo "CLEAN HDD & Keep Blockchain"
|
||||
sudo /home/admin/XXcleanHDD.sh
|
||||
;;
|
||||
*)
|
||||
echo "CANCEL"
|
||||
exit 0
|
||||
|
@@ -102,6 +102,7 @@ if [ "$1" = "delete" ]; then
|
||||
sudo sed -i "s/^txindex=.*/txindex=0/g" /mnt/hdd/${network}/${network}.conf
|
||||
echo "# deleting tx index ..."
|
||||
sudo rm -r /mnt/hdd/${network}/indexes/txindex
|
||||
echo "# restarting bitcoind ..."
|
||||
sudo systemctl restart ${network}d
|
||||
exit 0
|
||||
fi
|
||||
|
Reference in New Issue
Block a user