mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2024-11-20 10:12:06 +01:00
#661 added RESET-LND option
This commit is contained in:
parent
9abbbd0b3b
commit
8ed72efe2f
@ -215,7 +215,9 @@ if [ ${walletExists} -eq 0 ]; then
|
||||
fi
|
||||
done
|
||||
|
||||
sudo sed -i "s/^setupStep=.*/setupStep=65/g" /home/admin/raspiblitz.info
|
||||
if [ ${setupStep} -lt 100 ]; then
|
||||
sudo sed -i "s/^setupStep=.*/setupStep=65/g" /home/admin/raspiblitz.info
|
||||
fi
|
||||
|
||||
else
|
||||
|
||||
@ -457,9 +459,21 @@ else
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# set SetupState (scan is done - so its 80%)
|
||||
sudo sed -i "s/^setupStep=.*/setupStep=80/g" /home/admin/raspiblitz.info
|
||||
if [ ${setupStep} -lt 100 ]; then
|
||||
|
||||
###### finishSetup
|
||||
sudo /home/admin/90finishSetup.sh
|
||||
sudo /home/admin/95finalSetup.sh
|
||||
# set SetupState (scan is done - so its 80%)
|
||||
sudo sed -i "s/^setupStep=.*/setupStep=80/g" /home/admin/raspiblitz.info
|
||||
|
||||
###### finishSetup
|
||||
sudo /home/admin/90finishSetup.sh
|
||||
sudo /home/admin/95finalSetup.sh
|
||||
|
||||
else
|
||||
|
||||
whiptail --title "RESET DONE" --msgbox "
|
||||
OK LND Reset is done.
|
||||
System will restart now.
|
||||
" 10 35
|
||||
sudo shutdown -r now
|
||||
|
||||
fi
|
@ -4,40 +4,15 @@
|
||||
source /home/admin/raspiblitz.info
|
||||
source /mnt/hdd/raspiblitz.conf
|
||||
|
||||
# Basic Options
|
||||
OPTIONS=(HARDWARE "Run Hardwaretest" \
|
||||
SOFTWARE "Run Softwaretest (DebugReport)" \
|
||||
BLOCKCHAIN "Delete Blockchain & Re-Download" \
|
||||
CLEANHDD "Delete Data - keep Blockchain"
|
||||
)
|
||||
askBackupCopy()
|
||||
{
|
||||
whiptail --title "LND Data Backup" --yes-button "Backup" --no-button "Skip" --yesno "
|
||||
Before deleting your data, do you want
|
||||
to make a backup of all your LND Data
|
||||
and download that file to your laptop?
|
||||
|
||||
CHOICE=$(whiptail --clear --title "Repair Options" --menu "" 12 60 5 "${OPTIONS[@]}" 2>&1 >/dev/tty)
|
||||
|
||||
clear
|
||||
case $CHOICE in
|
||||
HARDWARE)
|
||||
sudo /home/admin/05hardwareTest.sh
|
||||
/home/admin/00mainMenu.sh
|
||||
;;
|
||||
SOFTWARE)
|
||||
sudo /home/admin/XXdebugLogs.sh
|
||||
echo "Press ENTER to return to main menu."
|
||||
read key
|
||||
/home/admin/00mainMenu.sh
|
||||
;;
|
||||
BLOCKCHAIN)
|
||||
/home/admin/XXcleanHDD.sh -blockchain
|
||||
exit 1;
|
||||
;;
|
||||
CLEANHDD)
|
||||
|
||||
whiptail --title "LND Data Backup" --yes-button "Download Backup" --no-button "Skip" --yesno "
|
||||
Before deleting your data on HDD, do you
|
||||
want to make a backup of all your LND Data
|
||||
and download that file to your laptop.
|
||||
|
||||
Do you want to download LND Data Backup now?
|
||||
" 12 58
|
||||
Download LND Data Backup now?
|
||||
" 12 44
|
||||
if [ $? -eq 0 ]; then
|
||||
clear
|
||||
echo "*************************************"
|
||||
@ -58,8 +33,67 @@ Do you want to download LND Data Backup now?
|
||||
sleep 2
|
||||
/home/admin/config.scripts/lnd.rescue.sh backup no-download
|
||||
fi
|
||||
}
|
||||
|
||||
infoResetSDCard()
|
||||
{
|
||||
whiptail --title "RESET DONE" --msgbox "
|
||||
OK Reset of HDD is done.
|
||||
System will now shutdown.
|
||||
|
||||
To start fresh please write a fresh
|
||||
RaspiBlitz image to your SD card.
|
||||
" 12 40
|
||||
}
|
||||
|
||||
# Basic Options
|
||||
OPTIONS=(HARDWARE "Run Hardwaretest" \
|
||||
SOFTWARE "Run Softwaretest (DebugReport)" \
|
||||
RESET-CHAIN "Delete Blockchain & Re-Download" \
|
||||
RESET-LND "Delete LND & start new node/wallet" \
|
||||
RESET-HDD "Delete HDD Data but keep Blockchain" \
|
||||
RESET-ALL "Delete HDD completly to start fresh"
|
||||
)
|
||||
|
||||
CHOICE=$(whiptail --clear --title "Repair Options" --menu "" 12 60 5 "${OPTIONS[@]}" 2>&1 >/dev/tty)
|
||||
|
||||
clear
|
||||
case $CHOICE in
|
||||
HARDWARE)
|
||||
sudo /home/admin/05hardwareTest.sh
|
||||
/home/admin/00mainMenu.sh
|
||||
;;
|
||||
SOFTWARE)
|
||||
sudo /home/admin/XXdebugLogs.sh
|
||||
echo "Press ENTER to return to main menu."
|
||||
read key
|
||||
/home/admin/00mainMenu.sh
|
||||
;;
|
||||
RESET-CHAIN)
|
||||
/home/admin/XXcleanHDD.sh -blockchain
|
||||
/home/admin/98repairBlockchain.sh
|
||||
echo "For reboot type: sudo shutdown -r now"
|
||||
exit 1;
|
||||
;;
|
||||
RESET-LND)
|
||||
askBackupCopy
|
||||
sudo systemctl stop lnd
|
||||
sudo rm -r /mnt/hdd/lnd
|
||||
/home/admin/70initLND.sh
|
||||
exit 1;
|
||||
;;
|
||||
RESET-HDD)
|
||||
askBackupCopy
|
||||
/home/admin/XXcleanHDD.sh
|
||||
infoResetSDCard
|
||||
sudo shutdown now
|
||||
exit 1;
|
||||
;;
|
||||
RESET-ALL)
|
||||
askBackupCopy
|
||||
/home/admin/XXcleanHDD.sh -all
|
||||
infoResetSDCard
|
||||
sudo shutdown now
|
||||
exit 1;
|
||||
;;
|
||||
esac
|
||||
|
Loading…
Reference in New Issue
Block a user