mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-04-11 21:29:29 +02:00
#1116 update to newest LND on importing rescue file
This commit is contained in:
parent
2f2f22ee15
commit
4dbecbf7a7
@ -122,6 +122,7 @@ elif [ ${mode} = "restore" ]; then
|
||||
filename=$(sudo ls /home/admin/lnd-rescue-*.tar.gz)
|
||||
echo "OK -> found file to restore: ${filename}"
|
||||
|
||||
# checksum test
|
||||
md5checksum=$(md5sum ${filename} | head -n1 | cut -d " " -f1)
|
||||
isCorrect=$(echo ${filename} | grep -c ${md5checksum})
|
||||
if [ ${isCorrect} -eq 1 ]; then
|
||||
@ -132,6 +133,7 @@ elif [ ${mode} = "restore" ]; then
|
||||
echo "Recommend to abort and upload again!"
|
||||
fi
|
||||
|
||||
# overrride test
|
||||
oldWalletExists=$(sudo ls /mnt/hdd/lnd/data/chain/${network}/${chain}net/wallet.db 2>/dev/null | grep -c "wallet.db")
|
||||
if [ ${oldWalletExists} -gt 0 ]; then
|
||||
echo
|
||||
@ -166,6 +168,19 @@ elif [ ${mode} = "restore" ]; then
|
||||
echo "OK"
|
||||
echo
|
||||
|
||||
# check if LND needs update
|
||||
# (if RaspiBlitz has an optional LND version update, then install it
|
||||
# the newer LND version can always handle older data)
|
||||
echo "Checking LND version ..."
|
||||
source <(sudo -u admin /home/admin/config.scripts/lnd.update.sh info)
|
||||
if [ ${lndUpdateInstalled} -eq 0 ]; then
|
||||
echo "Installing available LND update ... (newer version can handle more wallet formats)"
|
||||
sudo -u admin /home/admin/config.scripts/lnd.update.sh verified
|
||||
else
|
||||
echo "OK"
|
||||
fi
|
||||
echo
|
||||
|
||||
# start LND
|
||||
echo "Starting lnd..."
|
||||
sudo systemctl start lnd
|
||||
|
Loading…
x
Reference in New Issue
Block a user