mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-23 14:40:45 +01:00
display Core Lightning at recovery, whitespaces
This commit is contained in:
parent
3044ca0f5f
commit
639170e155
2 changed files with 21 additions and 21 deletions
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
# check if started with sudo
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo "error='run as root'"
|
||||
exit 1
|
||||
fi
|
||||
|
@ -145,7 +145,7 @@ if [ "${hostname}" == "" ]; then
|
|||
exit 41
|
||||
fi
|
||||
|
||||
if [ "${lightning}" != "lnd" ]; then
|
||||
if [ "${lightning}" != "lnd" ]; then
|
||||
|
||||
###################################
|
||||
# Remove LND from systemd
|
||||
|
@ -156,7 +156,7 @@ if [ "${lightning}" != "lnd" ]; then
|
|||
systemctl daemon-reload
|
||||
fi
|
||||
|
||||
if [ "${lightning}" == "lnd" ]; then
|
||||
if [ "${lightning}" == "lnd" ]; then
|
||||
|
||||
###################################
|
||||
# LND
|
||||
|
@ -256,27 +256,27 @@ if [ "${lightning}" == "lnd" ]; then
|
|||
|
||||
# WALLET --> SEED (+ SCB to be restored later)
|
||||
elif [ "${seedWords}" != "" ]; then
|
||||
|
||||
echo "WALLET --> SEED" >> ${logFile}
|
||||
|
||||
echo "WALLET --> SEED" >> ${logFile}
|
||||
/home/admin/_cache.sh set message "LND Wallet (SEED)"
|
||||
if ! pip list | grep grpc; then sudo -H python3 -m pip install grpcio==1.38.1; fi
|
||||
if ! pip list | grep grpc; then sudo -H python3 -m pip install grpcio==1.38.1; fi
|
||||
source <(/home/admin/config.scripts/lnd.initwallet.py seed mainnet "${passwordC}" "${seedWords}" "${seedPassword}")
|
||||
if [ "${err}" != "" ]; then
|
||||
/home/admin/config.scripts/blitz.error.sh _provision.setup.sh "lnd-wallet-seed" "lnd.initwallet.py seed returned error" "/home/admin/config.scripts/lnd.initwallet.py seed mainnet ... --> ${err} + ${errMore}" ${logFile}
|
||||
exit 12
|
||||
fi
|
||||
|
||||
|
||||
# set lnd into recovery mode (gets activated after setup reboot)
|
||||
/home/admin/config.scripts/lnd.backup.sh mainnet recoverymode on >> ${logFile}
|
||||
echo "Rescanning will activate after setup-reboot ..." >> ${logFile}
|
||||
|
||||
|
||||
|
||||
# WALLET --> NEW
|
||||
else
|
||||
|
||||
echo "# WALLET --> NEW" >> ${logFile}
|
||||
/home/admin/_cache.sh set message "LND Wallet (NEW)"
|
||||
if ! pip list | grep grpc; then sudo -H python3 -m pip install grpcio==1.38.1; fi
|
||||
if ! pip list | grep grpc; then sudo -H python3 -m pip install grpcio==1.38.1; fi
|
||||
source <(/home/admin/config.scripts/lnd.initwallet.py new mainnet "${passwordC}")
|
||||
if [ "${err}" != "" ]; then
|
||||
/home/admin/config.scripts/blitz.error.sh _provision.setup.sh "lnd-wallet-new" "lnd.initwallet.py new returned error" "/home/admin/config.scripts/lnd.initwallet.py new mainnet ... --> ${err} + ${errMore}" ${logFile}
|
||||
|
@ -328,7 +328,7 @@ if [ "${lightning}" == "lnd" ]; then
|
|||
|
||||
fi
|
||||
|
||||
if [ "${lightning}" == "cl" ]; then
|
||||
if [ "${lightning}" == "cl" ]; then
|
||||
|
||||
###################################
|
||||
# c-lightning
|
||||
|
@ -336,11 +336,11 @@ if [ "${lightning}" == "cl" ]; then
|
|||
|
||||
# install c-lightning (when not done by sd card fatpack)
|
||||
# if already installed - will skip
|
||||
/home/admin/_cache.sh set message "C-Lightning Install"
|
||||
/home/admin/_cache.sh set message "Core Lightning Install"
|
||||
/home/admin/config.scripts/cl.install.sh install >> ${logFile}
|
||||
|
||||
echo "# switch mainnet config on" >> ${logFile}
|
||||
/home/admin/_cache.sh set message "C-Lightning Setup"
|
||||
/home/admin/_cache.sh set message "Core Lightning Setup"
|
||||
/home/admin/config.scripts/cl.install.sh on mainnet >> ${logFile}
|
||||
|
||||
echo "# switch cln-grpc on" >> ${logFile}
|
||||
|
@ -358,7 +358,7 @@ if [ "${lightning}" == "cl" ]; then
|
|||
fi
|
||||
|
||||
# detect if the imported hsm_secret is encrypted and set in raspiblitz.conf
|
||||
# use the variables for the default network
|
||||
# use the variables for the default network
|
||||
source <(/home/admin/config.scripts/network.aliases.sh getvars cl mainnet)
|
||||
hsmSecretPath="/home/bitcoin/.lightning/bitcoin/hsm_secret"
|
||||
# check if encrypted
|
||||
|
@ -400,7 +400,7 @@ if [ "${lightning}" == "cl" ]; then
|
|||
echo "# Restore CL wallet from seedWords ..." >> ${logFile}
|
||||
source <(/home/admin/config.scripts/cl.hsmtool.sh seed-force mainnet "${seedWords}" "${seedPassword}")
|
||||
|
||||
# check if wallet really got created
|
||||
# check if wallet really got created
|
||||
walletExistsNow=$(ls /home/bitcoin/.lightning/bitcoin/hsm_secret 2>/dev/null | grep -c "hsm_secret")
|
||||
if [ $walletExistsNow -eq 0 ]; then
|
||||
/home/admin/config.scripts/blitz.error.sh _provision.setup.sh "cl-wallet-seed" "cl.hsmtool.sh seed-force not created wallet" "ls /home/bitcoin/.lightning/bitcoin/hsm_secret --> 0" ${logFile}
|
||||
|
@ -429,7 +429,7 @@ if [ "${lightning}" == "cl" ]; then
|
|||
exit 18
|
||||
fi
|
||||
|
||||
# check if wallet really got created
|
||||
# check if wallet really got created
|
||||
walletExistsNow=$(ls /home/bitcoin/.lightning/bitcoin/hsm_secret 2>/dev/null | grep -c "hsm_secret")
|
||||
if [ $walletExistsNow -eq 0 ]; then
|
||||
/home/admin/config.scripts/blitz.error.sh _provision.setup.sh "cl-wallet-new-nowallet" "cl.hsmtool.sh new-force did not create wallet" "/home/bitcoin/.lightning/bitcoin/hsm_secret --> missing" ${logFile}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
# check if run by root user
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo "error='run as root'"
|
||||
exit 1
|
||||
fi
|
||||
|
@ -79,7 +79,7 @@ echo "prechecks OK" >> ${logFile}
|
|||
|
||||
# MIGRATION - DATA CONVERSION when updating config
|
||||
# this is the place if on a future version change
|
||||
# a conversion of config data or app data is needed
|
||||
# a conversion of config data or app data is needed
|
||||
|
||||
# if old bitcoin.conf exists ...
|
||||
configExists=$(sudo ls /mnt/hdd/bitcoin/bitcoin.conf | grep -c '.conf')
|
||||
|
@ -245,7 +245,7 @@ if [ "${lightning}" == "lnd" ] || [ "${lnd}" == "on" ]; then
|
|||
else
|
||||
echo " - OK 'tlsdisableautofill' exists (${configParamExists})" >> ${logFile}
|
||||
fi
|
||||
|
||||
|
||||
else
|
||||
echo " - WARN: section '[Application Options]' not found in lnd.conf" >> ${logFile}
|
||||
fi
|
||||
|
@ -262,10 +262,10 @@ fi
|
|||
|
||||
if [ "${lightning}" == "cl" ] || [ "${cl}" == "on" ]; then
|
||||
|
||||
echo "Install C-lightning on update" >> ${logFile}
|
||||
/home/admin/_cache.sh set message "C-Lightning Install"
|
||||
echo "Install Core Lightning on update" >> ${logFile}
|
||||
/home/admin/_cache.sh set message "Core Lightning install"
|
||||
/home/admin/config.scripts/cl.install.sh on mainnet >> ${logFile}
|
||||
/home/admin/_cache.sh set message "C-Lightning Setup"
|
||||
/home/admin/_cache.sh set message "Core Lightning Setup"
|
||||
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue