change indent

This commit is contained in:
rootzoll
2021-06-25 00:14:41 +02:00
parent 565c24e72b
commit f008eb4732

View File

@@ -44,50 +44,50 @@ fi
############# SCB activation ############# SCB activation
# check if there is a channel.backup to activate # check if there is a channel.backup to activate
gotSCB=$(ls /home/admin/channel.backup 2>/dev/null | grep -c 'channel.backup') gotSCB=$(ls /home/admin/channel.backup 2>/dev/null | grep -c 'channel.backup')
if [ ${gotSCB} -eq 1 ]; then if [ "${gotSCB}" == "1" ]; then
echo "*** channel.backup Recovery ***" echo "*** channel.backup Recovery ***"
lncli --chain=${network} restorechanbackup --multi_file=/home/admin/channel.backup 2>/home/admin/.error.tmp lncli --chain=${network} restorechanbackup --multi_file=/home/admin/channel.backup 2>/home/admin/.error.tmp
error=`cat /home/admin/.error.tmp` error=`cat /home/admin/.error.tmp`
rm /home/admin/.error.tmp 2>/dev/null rm /home/admin/.error.tmp 2>/dev/null
if [ ${#error} -gt 0 ]; then if [ ${#error} -gt 0 ]; then
# output error message # output error message
echo "" echo ""
echo "!!! FAIL !!! SOMETHING WENT WRONG:" echo "!!! FAIL !!! SOMETHING WENT WRONG:"
echo "${error}" echo "${error}"
# check if its possible to give background info on the error # check if its possible to give background info on the error
notMachtingSeed=$(echo $error | grep -c 'unable to unpack chan backup') notMachtingSeed=$(echo $error | grep -c 'unable to unpack chan backup')
if [ ${notMachtingSeed} -gt 0 ]; then if [ ${notMachtingSeed} -gt 0 ]; then
echo "--> ERROR BACKGROUND:" echo "--> ERROR BACKGROUND:"
echo "The WORD SEED is not matching the channel.backup file." echo "The WORD SEED is not matching the channel.backup file."
echo "Either there was an error in the word seed list or" echo "Either there was an error in the word seed list or"
echo "or the channel.backup file is from another RaspiBlitz." echo "or the channel.backup file is from another RaspiBlitz."
echo
fi
# basic info on error
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo echo
echo "You can try after full setup to restore channel.backup file again with:" fi
echo "lncli --chain=${network} restorechanbackup --multi_file=/home/admin/channel.backup"
echo # basic info on error
echo "Press ENTER to continue for now ..." echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
read key echo
else echo "You can try after full setup to restore channel.backup file again with:"
mv /home/admin/channel.backup /home/admin/channel.backup.done echo "lncli --chain=${network} restorechanbackup --multi_file=/home/admin/channel.backup"
dialog --title " OK channel.backup IMPORT " --msgbox " echo
echo "Press ENTER to continue for now ..."
read key
else
mv /home/admin/channel.backup /home/admin/channel.backup.done
dialog --title " OK channel.backup IMPORT " --msgbox "
LND accepted the channel.backup file you uploaded. LND accepted the channel.backup file you uploaded.
It will now take around a hour until you can see, It will now take around a hour until you can see,
if LND was able to recover funds from your channels. if LND was able to recover funds from your channels.
" 9 56 " 9 56
fi
fi fi
fi
############################################ ############################################
# SETUP DONE CONFIRMATION (Konfetti Moment) # SETUP DONE CONFIRMATION (Konfetti Moment)