Browse Source

make sure bitcoin is stpooed

v1.1
Christian Rotzoll 6 years ago
parent
commit
4369c8ec01
  1. 12
      home.admin/00mainMenu.sh
  2. 9
      home.admin/50torrentHDD.sh

12
home.admin/00mainMenu.sh

@ -65,6 +65,15 @@ if [ "${state}" = "reindex" ]; then
exit 1
fi
# singal that torrent is in re-download
if [ "${state}" = "retorrent" ]; then
echo "Re-Index in progress ... start monitoring:"
/home/admin/50torrentHDD.sh
sudo sed -i "s/^state=.*/state=repair/g" /home/admin/raspiblitz.info
/home/admin/00mainMenu.sh
exit
fi
# if pre-sync is running - stop it - before continue
if [ "${state}" = "presync" ]; then
# stopping the pre-sync
@ -157,6 +166,7 @@ waitUntilChainNetworkIsReady()
reindex=$(sudo cat /mnt/hdd/${network}/debug.log | grep -c 'Please restart with -reindex or -reindex-chainstate to recover')
if [ ${reindex} -gt 0 ] || [ "${clienterror}" = "missing blockchain" ]; then
echo "!! DETECTED NEED FOR RE-INDEX in debug.log ... starting repair options."
sudo sed -i "s/^state=.*/state=repair/g" /home/admin/raspiblitz.info
sleep 3
dialog --backtitle "RaspiBlitz - Repair Script" --msgbox "Your blockchain data needs to be repaired.
@ -184,6 +194,7 @@ To run a BACKUP of funds & channels first is recommended.
echo "Starting TORRENT ..."
sudo sed -i "s/^state=.*/state=retorrent/g" /home/admin/raspiblitz.info
/home/admin/50torrentHDD.sh
sudo sed -i "s/^state=.*/state=repair/g" /home/admin/raspiblitz.info
/home/admin/00mainMenu.sh
exit
@ -191,6 +202,7 @@ To run a BACKUP of funds & channels first is recommended.
echo "Starting COPY ..."
sudo sed -i "s/^state=.*/state=recopy/g" /home/admin/raspiblitz.info
/home/admin/50copyHDD.sh
sudo sed -i "s/^state=.*/state=repair/g" /home/admin/raspiblitz.info
/home/admin/00mainMenu.sh
exit

9
home.admin/50torrentHDD.sh

@ -7,6 +7,15 @@ echo ""
## get basic info
source /home/admin/raspiblitz.info
# if setup was done - remove old data
if [ "${setupStep}" = "100" ]; then
echo "stopping servcies ..."
sudo systemctl stop lnd
sudo systemctl stop ${network}d
sudo systemctl disable ${network}d
fi
# make sure rtorrent is available
sudo apt-get install rtorrent -y
echo ""

Loading…
Cancel
Save