This commit is contained in:
rootzoll 2021-09-20 16:40:52 +02:00
commit 360aed1b44
11 changed files with 254 additions and 141 deletions

View File

@ -5,24 +5,26 @@
- New: C-lightning v0.10.1 [details](https://github.com/ElementsProject/lightning/releases/tag/v0.10.1)
- New: C-lightningREST v0.5.1 [details](https://github.com/Ride-The-Lightning/c-lightning-REST/releases/tag/v0.5.1)
- New: CLN plugin: Sparko [details](https://github.com/fiatjaf/sparko)
- New: CLN plugin: CLBOSS The C-Lightning Node Manager [details](https://github.com/ZmnSCPxj/clboss#clboss-the-c-lightning-node-manager)
- New: Suez - channel visualization for LND and CLN [details](https://github.com/prusnak/suez)
- New: LND Static Channel Backup to Nextcloud
-
- Update: Bitcoin Core v22.0 [details](https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-22.0.md)
- Update: LND v0.13.1 [details](https://github.com/lightningnetwork/lnd/releases/tag/v0.13.1-beta)
- Update: RTL 0.11.2 [details](https://github.com/Ride-The-Lightning/RTL/releases/tag/v0.11.2)
- Update: Specter Desktop 1.6.0 [details](https://github.com/cryptoadvance/specter-desktop/blob/master/README.md)
- Update: Lightning Terminal v0.5.0-alpha [details](https://github.com/lightninglabs/lightning-terminal/releases/tag/v0.5.0-alpha)
- Update: Pool CLI v0.5.1-alpha [details](https://github.com/lightninglabs/pool/releases/tag/v0.5.1-alpha)
- Update: Balance of Satoshis 10.7.8 (BOS) + keep data on reinstall [details](https://github.com/alexbosworth/balanceofsatoshis/blob/master/CHANGELOG.md#version-8010)
- Update: Circuitbreaker v0.3.0 [details](https://github.com/lightningequipment/circuitbreaker/blob/master/README.md)
- Update: JoinMarket v0.9.1 [details](https://github.com/JoinMarket-Org/joinmarket-clientserver/#joinmarket-clientserver)
- Update: JoininBox v0.6.0 [details](https://github.com/openoms/joininbox/tree/master#joininbox)
- Update: Electrum Server in Rust (electrs) v0.8.11 [details](https://github.com/romanz/electrs/blob/v0.8.11/RELEASE-NOTES.md#0811-18-aug-2021)
- Update: Electrum Server in Rust (electrs) v0.9.0-rc1 [details](https://github.com/romanz/electrs/blob/v0.9.0-rc1/RELEASE-NOTES.md)
- Update: Mempool 2.2.2 [details](https://github.com/mempool/mempool)
- Update: BTC-RPC-Explorer v3.2.0 [details](https://github.com/janoside/btc-rpc-explorer/blob/master/CHANGELOG.md#v320)
- Update: stacking-sats-kraken 0.4.4 [details](https://github.com/dennisreimann/stacking-sats-kraken/blob/master/README.md)
- Update: BTCPayServer 1.2.3 [details](https://github.com/btcpayserver/btcpayserver/releases/tag/v1.2.3)
- Update: LND v0.13.1 [details](https://github.com/lightningnetwork/lnd/releases/tag/v0.13.1-beta)
- Update: RTL 0.11.2 [details](https://github.com/Ride-The-Lightning/RTL/releases/tag/v0.11.2)
- Update: Lightning Terminal v0.5.0-alpha [details](https://github.com/lightninglabs/lightning-terminal/releases/tag/v0.5.0-alpha)
- Update: Pool CLI v0.5.1-alpha [details](https://github.com/lightninglabs/pool/releases/tag/v0.5.1-alpha)
- Update: Balance of Satoshis 10.7.8 (BOS) + keep data on reinstall [details](https://github.com/alexbosworth/balanceofsatoshis/blob/master/CHANGELOG.md#version-8010)
- Update: Circuitbreaker v0.3.0 [details](https://github.com/lightningequipment/circuitbreaker/blob/master/README.md)
## What's new in Version 1.7.0 of RaspiBlitz?

View File

@ -104,7 +104,7 @@ while :
# TODO: ALSO SEPARATE GUI/ACTION FOR THE SCANNING / WALLET UNLOCK / ERROR DETECTION
# if lightning is syncing or scanning
source <(sudo /home/admin/config.scripts/blitz.statusscan.sh $lightning)
if [ "${walletLocked}" == "1" ]; then
if [ "${walletLocked}" == "1" ] || [ "${CLNwalletLocked}" == "1" ]; then
/home/admin/setup.scripts/eventInfoWait.sh "walletlocked" "" lcd
sleep 3
continue

View File

@ -141,6 +141,12 @@ do
/home/admin/config.scripts/lnd.unlock.sh
fi
# CLN Wallet Unlock
if [ "${CLNwalletLocked}" == "1" ] && [ "${state}" == "ready" ] && [ "${setupPhase}" == "done" ]; then
/home/admin/config.scripts/cln.hsmtool.sh unlock
sleep 5
fi
#####################################
# SETUP MENU
#####################################

View File

@ -15,6 +15,9 @@ if [ ${#touchscreen} -eq 0 ]; then touchscreen=0; fi
if [ ${#lcdrotate} -eq 0 ]; then lcdrotate=0; fi
if [ ${#zerotier} -eq 0 ]; then zerotier="off"; fi
if [ ${#circuitbreaker} -eq 0 ]; then circuitbreaker="off"; fi
if [ ${#clboss} -eq 0 ]; then clboss="off"; fi
if [ ${#clnEncryptedHSM} -eq 0 ]; then clnEncryptedHSM="off"; fi
if [ ${#clnAutoUnlock} -eq 0 ]; then clnAutoUnlock="off"; fi
echo "# map LND to on/off"
lndNode="off"
@ -46,7 +49,7 @@ if [ "${zerotier}" != "off" ]; then zerotierSwitch="on"; fi
echo "# map parallel testnets to on/off"
parallelTestnets="off"
if [ "${testnet}" == "on"] || [ "${signet}" == "on" ]; then
if [ "${testnet}" == "on" ] || [ "${signet}" == "on" ]; then
parallelTestnets="on"
fi
@ -85,6 +88,24 @@ if [ ${keysendOn} -eq 0 ]; then
keysend="off"
fi
echo "# map clboss to on/off"
clbossMenu='off'
if [ "${clboss}" == "on" ]; then
clbossMenu='on'
fi
echo "# map clnEncryptedHSM to on/off"
clnEncryptedHSMMenu='off'
if [ "${clnEncryptedHSM}" == "on" ]; then
clnEncryptedHSMMenu='on'
fi
echo "# map clnAutoUnlock to on/off"
clnAutoUnlockMenu='off'
if [ "${clnAutoUnlock}" == "on" ]; then
clnAutoUnlockMenu='on'
fi
# show select dialog
echo "run dialog ..."
@ -122,6 +143,13 @@ fi
# C-Lightning & options/PlugIns
OPTIONS+=(n 'CLN C-LIGHTNING NODE' ${clnNode})
if [ "${clnNode}" == "on" ]; then
OPTIONS+=(o '-CLN CLBOSS Automatic Node Manager' ${clbossMenu})
OPTIONS+=(h '-CLN Wallet Encryption' ${clnEncryptedHSMMenu})
if [ "${clnEncryptedHSM}" == "on" ]; then
OPTIONS+=(q '-CLN Auto-Unlock' ${clnAutoUnlockMenu})
fi
fi
CHOICE_HEIGHT=$(("${#OPTIONS[@]}/2+1"))
HEIGHT=$((CHOICE_HEIGHT+6))
@ -428,6 +456,50 @@ else
echo "C-Lightning NODE setting unchanged."
fi
# CLBOSS process choice
choice="off"; check=$(echo "${CHOICES}" | grep -c "o")
if [ ${check} -eq 1 ]; then choice="on"; fi
if [ "${clboss}" != "${choice}" ] && [ "${clnNode}" == "on" ]; then
echo "CLBOSS Setting changed .."
anychange=1
sudo /home/admin/config.scripts/cln-plugin.clboss.sh ${choice}
needsReboot=0
else
echo "CLBOSS Setting unchanged."
fi
# clnEncryptedHSM process choice
choice="off"; check=$(echo "${CHOICES}" | grep -c "h")
if [ ${check} -eq 1 ]; then choice="on"; fi
if [ "${clnEncryptedHSM}" != "${choice}" ] && [ "${clnNode}" == "on" ]; then
echo "clnEncryptedHSM Setting changed .."
anychange=1
if [ "${choice}" == "on" ]; then
/home/admin/config.scripts/cln.hsmtool.sh encrypt mainnet
else
/home/admin/config.scripts/cln.hsmtool.sh decrypt mainnet
fi
needsReboot=0
else
echo "clnEncryptedHSM Setting unchanged."
fi
# clnAutoUnlock process choice
choice="off"; check=$(echo "${CHOICES}" | grep -c "q")
if [ ${check} -eq 1 ]; then choice="on"; fi
if [ "${clnAutoUnlock}" != "${choice}" ] && [ "${clnNode}" == "on" ]; then
echo "clnAutoUnlock Setting changed .."
anychange=1
if [ "${choice}" == "on" ]; then
/home/admin/config.scripts/cln.hsmtool.sh autounlock-on mainnet
else
/home/admin/config.scripts/cln.hsmtool.sh autounlock-off mainnet
fi
needsReboot=0
else
echo "clnAutoUnlock Setting unchanged."
fi
# parallel testnet process choice
choice="off"; check=$(echo "${CHOICES}" | grep -c "p")
if [ ${check} -eq 1 ]; then choice="on"; fi

View File

@ -209,7 +209,7 @@ The index database needs to be created before Electrum Server can be used.\n
This can take hours/days depending on your RaspiBlitz. Monitor the progress on the LCD.\n
When finished use the new 'ELECTRS' entry in Main Menu for more info.\n
" 14 50
needsReboot=1
needsReboot=0
else
l1="!!! FAIL on ElectRS install !!!"
l2="Try manual install on terminal after reboot with:"

View File

@ -48,126 +48,126 @@ CHOICE=$(dialog --clear \
case $CHOICE in
ENCRYPT)
/home/admin/config.scripts/cln.hsmtool.sh encrypt $CHAIN
source /mnt/hdd/raspiblitz.conf
;;
/home/admin/config.scripts/cln.hsmtool.sh encrypt $CHAIN
source /mnt/hdd/raspiblitz.conf
;;
DECRYPT)
/home/admin/config.scripts/cln.hsmtool.sh decrypt $CHAIN
source /mnt/hdd/raspiblitz.conf
;;
/home/admin/config.scripts/cln.hsmtool.sh decrypt $CHAIN
source /mnt/hdd/raspiblitz.conf
;;
PASSWORD_C)
/home/admin/config.scripts/cln.hsmtool.sh change-password $CHAIN
;;
/home/admin/config.scripts/cln.hsmtool.sh change-password $CHAIN
;;
AUTOUNLOCK-ON)
/home/admin/config.scripts/cln.hsmtool.sh autounlock-on $CHAIN
;;
/home/admin/config.scripts/cln.hsmtool.sh autounlock-on $CHAIN
;;
AUTOUNLOCK-OFF)
/home/admin/config.scripts/cln.hsmtool.sh autounlock-off $CHAIN
;;
/home/admin/config.scripts/cln.hsmtool.sh autounlock-off $CHAIN
;;
BACKUP)
## from dialogLightningWallet.sh
# run upload dialog and get result
_temp="/var/cache/raspiblitz/temp/.temp.tmp"
clear
/home/admin/config.scripts/cln.backup.sh cln-export-gui production $_temp
source $_temp 2>/dev/null
sudo rm $_temp 2>/dev/null
;;
## from dialogLightningWallet.sh
# run upload dialog and get result
_temp="/var/cache/raspiblitz/temp/.temp.tmp"
clear
/home/admin/config.scripts/cln.backup.sh cln-export-gui production $_temp
source $_temp 2>/dev/null
sudo rm $_temp 2>/dev/null
;;
RESET)
# backup
## from dialogLightningWallet.sh
_temp="/var/cache/raspiblitz/temp/.temp.tmp"
clear
/home/admin/config.scripts/cln.backup.sh cln-export-gui production $_temp
source $_temp 2>/dev/null
sudo rm $_temp 2>/dev/null
echo
echo "The rescue file is stored on the SDcard named cln-rescue.*.tar.gz just in case."
echo "The next step will overwrite the old C-lighthning $CHAIN wallet"
echo "Press ENTER to continue or CTRL+C to abort"
read key
# reset
sudo rm /home/bitcoin/.lightning/${CLNETWORK}/hsm_secret
sudo rm /home/bitcoin/.lightning/${CLNETWORK}/*.*
# make sure the new hsm_secret is treated as unencrypted and clear autounlock
sudo sed -i \
"s/^${netprefix}clnEncryptedHSM=.*/${netprefix}clnEncryptedHSM=off/g" \
/mnt/hdd/raspiblitz.conf
sudo sed -i \
"s/^${netprefix}clnAutoUnlock=.*/${netprefix}clnEncryptedHSM=off/g" \
/mnt/hdd/raspiblitz.conf
# new
/home/admin/config.scripts/cln.hsmtool.sh new $CHAIN
# set the lightningd service file on each active network
if [ "${cln}" == "on" ] || [ "${cln}" == "1" ]; then
/home/admin/config.scripts/cln.install-service.sh mainnet
fi
if [ "${tcln}" == "on" ] || [ "${tcln}" == "1" ]; then
/home/admin/config.scripts/cln.install-service.sh testnet
fi
if [ "${scln}" == "on" ] || [ "${scln}" == "1" ]; then
/home/admin/config.scripts/cln.install-service.sh signet
fi
;;
# backup
## from dialogLightningWallet.sh
_temp="/var/cache/raspiblitz/temp/.temp.tmp"
clear
/home/admin/config.scripts/cln.backup.sh cln-export-gui production $_temp
source $_temp 2>/dev/null
sudo rm $_temp 2>/dev/null
echo
echo "The rescue file is stored on the SDcard named cln-rescue.*.tar.gz just in case."
echo "The next step will overwrite the old C-lighthning $CHAIN wallet"
echo "Press ENTER to continue or CTRL+C to abort"
read key
# reset
sudo rm /home/bitcoin/.lightning/${CLNETWORK}/hsm_secret
sudo rm /home/bitcoin/.lightning/${CLNETWORK}/*.*
# make sure the new hsm_secret is treated as unencrypted and clear autounlock
sudo sed -i \
"s/^${netprefix}clnEncryptedHSM=.*/${netprefix}clnEncryptedHSM=off/g" \
/mnt/hdd/raspiblitz.conf
sudo sed -i \
"s/^${netprefix}clnAutoUnlock=.*/${netprefix}clnEncryptedHSM=off/g" \
/mnt/hdd/raspiblitz.conf
# new
/home/admin/config.scripts/cln.hsmtool.sh new $CHAIN
# set the lightningd service file on each active network
if [ "${cln}" == "on" ] || [ "${cln}" == "1" ]; then
/home/admin/config.scripts/cln.install-service.sh mainnet
fi
if [ "${tcln}" == "on" ] || [ "${tcln}" == "1" ]; then
/home/admin/config.scripts/cln.install-service.sh testnet
fi
if [ "${scln}" == "on" ] || [ "${scln}" == "1" ]; then
/home/admin/config.scripts/cln.install-service.sh signet
fi
;;
FILERESTORE)
# backup
## from dialogLightningWallet.sh
_temp="/var/cache/raspiblitz/temp/.temp.tmp"
clear
/home/admin/config.scripts/cln.backup.sh cln-export-gui production $_temp
source $_temp 2>/dev/null
sudo rm $_temp 2>/dev/null
echo
echo "The rescue file is stored on the SDcard named cln-rescue.*.tar.gz just in case."
echo "The next step will overwrite the old C-lighthning $CHAIN wallet"
echo "Press ENTER to continue or CTRL+C to abort"
read key
# reset
sudo rm /home/bitcoin/.lightning/${CLNETWORK}/hsm_secret
sudo rm /home/bitcoin/.lightning/${CLNETWORK}/*.*
# import file
_temp="/var/cache/raspiblitz/temp/.temp.tmp"
clear
/home/admin/config.scripts/cln.backup.sh cln-import-gui production $_temp
source $_temp 2>/dev/null
sudo rm $_temp 2>/dev/null
;;
# backup
## from dialogLightningWallet.sh
_temp="/var/cache/raspiblitz/temp/.temp.tmp"
clear
/home/admin/config.scripts/cln.backup.sh cln-export-gui production $_temp
source $_temp 2>/dev/null
sudo rm $_temp 2>/dev/null
echo
echo "The rescue file is stored on the SDcard named cln-rescue.*.tar.gz just in case."
echo "The next step will overwrite the old C-lighthning $CHAIN wallet"
echo "Press ENTER to continue or CTRL+C to abort"
read key
# reset
sudo rm /home/bitcoin/.lightning/${CLNETWORK}/hsm_secret
sudo rm /home/bitcoin/.lightning/${CLNETWORK}/*.*
# import file
_temp="/var/cache/raspiblitz/temp/.temp.tmp"
clear
/home/admin/config.scripts/cln.backup.sh cln-import-gui production $_temp
source $_temp 2>/dev/null
sudo rm $_temp 2>/dev/null
;;
SEEDRESTORE)
# backup
## from dialogLightningWallet.sh
_temp="/var/cache/raspiblitz/temp/.temp.tmp"
clear
/home/admin/config.scripts/cln.backup.sh cln-export-gui production $_temp
source $_temp 2>/dev/null
sudo rm $_temp 2>/dev/null
echo
echo "The rescue file is stored on the SDcard named cln-rescue.*.tar.gz just in case."
echo "The next step will overwrite the old C-lighthning $CHAIN wallet"
echo "Press ENTER to continue or CTRL+C to abort"
read key
# reset
sudo rm /home/bitcoin/.lightning/${CLNETWORK}/hsm_secret
sudo rm /home/bitcoin/.lightning/${CLNETWORK}/config
sudo rm /home/bitcoin/.lightning/${CLNETWORK}/*.*
# import seed
_temp="/var/cache/raspiblitz/.temp.tmp"
/home/admin/config.scripts/cln.backup.sh seed-import-gui $_temp
/home/admin/config.scripts/cln.hsmtool.sh seed "$CHAIN" "$(cat $_temp)"
source $_temp 2>/dev/null
sudo rm $_temp 2>/dev/null
# regenerate config
/home/admin/config.scripts/cln.hsmtool.sh autounlock-off
/home/admin/config.scripts/cln.hsmtool.sh decrypt
/home/admin/config.scripts/cln.install.sh on $CHAIN
;;
# backup
## from dialogLightningWallet.sh
_temp="/var/cache/raspiblitz/temp/.temp.tmp"
clear
/home/admin/config.scripts/cln.backup.sh cln-export-gui production $_temp
source $_temp 2>/dev/null
sudo rm $_temp 2>/dev/null
echo
echo "The rescue file is stored on the SDcard named cln-rescue.*.tar.gz just in case."
echo "The next step will overwrite the old C-lighthning $CHAIN wallet"
echo "Press ENTER to continue or CTRL+C to abort"
read key
# reset
sudo rm /home/bitcoin/.lightning/${CLNETWORK}/hsm_secret
sudo rm /home/bitcoin/.lightning/${CLNETWORK}/config
sudo rm /home/bitcoin/.lightning/${CLNETWORK}/*.*
# import seed
_temp="/var/cache/raspiblitz/.temp.tmp"
/home/admin/config.scripts/cln.backup.sh seed-import-gui $_temp
/home/admin/config.scripts/cln.hsmtool.sh seed "$CHAIN" "$(cat $_temp)"
source $_temp 2>/dev/null
sudo rm $_temp 2>/dev/null
# regenerate config
/home/admin/config.scripts/cln.hsmtool.sh autounlock-off
/home/admin/config.scripts/cln.hsmtool.sh decrypt
/home/admin/config.scripts/cln.install.sh on $CHAIN
;;
esac

View File

@ -45,7 +45,10 @@ if [ ${#abcd} -eq 0 ]; then
OPTIONS+=(A "Master Login Password")
OPTIONS+=(B "RPC/App Password")
if [ "${lightning}" == "lnd" ] || [ "${lnd}" == "on" ]; then
OPTIONS+=(C "Lightning Wallet Password")
OPTIONS+=(C "LND Lightning Wallet Password")
fi
if [ "${cln}" == "on" ] && [ "${clnEncryptedHSM}" == "on" ]; then
OPTIONS+=(CLN "C-Lightning Wallet Password")
fi
CHOICE=$(dialog --clear \
--backtitle "RaspiBlitz" \
@ -68,6 +71,9 @@ if [ ${#abcd} -eq 0 ]; then
D)
abcd='d';
;;
CLN)
abcd='cln';
;;
*)
exit 0
;;
@ -435,7 +441,12 @@ elif [ "${abcd}" = "x" ]; then
# store result is file
echo "${password1}" > ${resultFile}
elif [ "${abcd}" = "cln" ]; then
/home/admin/config.scripts/cln.hsmtool.sh change-password mainnet
# do not reboot for cln password
reboot=0
# everything else
else
echo "FAIL: there is no password '${abcd}' (reminder: use lower case)"

View File

@ -279,6 +279,21 @@ fi
# is CLN running
clnRunning=$(systemctl status ${netprefix}lightningd.service 2>/dev/null | grep -c running)
echo "clnActive=${clnRunning}"
echo "CLNwalletLocked=0"
if [ "${clnRunning}" != "1" ] && [ "${LNTYPE}" == "cln" ]; then
clnInfo=$($lightningcli_alias getinfo 2>&1)
# check if locked
if [ $(echo "${clnInfo}" | grep -c "Connecting to 'lightning-rpc': Connection refused") -gt 0 ];then
echo "# CLN wallet not running yet"
clnError=$(sudo journalctl -n5 -u lightningd)
if [ $(echo "${clnError}" | grep -c 'encrypted-hsm: Could not read pass from stdin.') -gt 0 ]\
|| [ $(echo "${clnError}" | grep -c 'hsm_secret is encrypted, you need to pass the --encrypted-hsm startup option.') -gt 0 ]\
|| [ $(echo "${clnError}" | grep -c 'Wrong password for encrypted hsm_secret.') -gt 0 ]; then
echo "CLNwalletLocked=1"
fi
fi
fi
if [ "${clnRunning}" == "1" ] && [ "${LNTYPE}" == "cln" ]; then
clnInfo=$($lightningcli_alias getinfo)
clnBlockHeight=$(echo "${clnInfo}" | jq -r '.blockheight' | tr -cd '[[:digit:]]')

View File

@ -1,7 +1,7 @@
#!/bin/bash
# https://github.com/romanz/electrs/blob/master/doc/usage.md
ELECTRSVERSION=v0.8.11
ELECTRSVERSION="v0.9.0-rc1"
# command info
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
@ -275,22 +275,17 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
sudo apt install -y clang cmake build-essential # for building 'rust-rocksdb'
echo
echo "# Downloading and building electrs $ELECTRSVERSION. This will take ~30 minutes" # ~22 min on an Odroid XU4
echo "# Downloading and building electrs $ELECTRSVERSION. This will take ~40 minutes"
echo
sudo -u electrs git clone https://github.com/romanz/electrs
cd /home/electrs/electrs || exit 1
sudo -u electrs git reset --hard $ELECTRSVERSION
sudo -u electrs cargo build --release || exit 1
sudo -u electrs cargo build --locked --release || exit 1
echo
echo "# The electrs database will be built in /mnt/hdd/app-storage/electrs/db. Takes ~18 hours and ~50Gb diskspace"
echo
# move old-database if present
if [ -d "/mnt/hdd/electrs/db" ]; then
echo "Moving existing ElectRS index to /mnt/hdd/app-storage/electrs..."
sudo mv -f /mnt/hdd/electrs /mnt/hdd/app-storage/
fi
sudo mkdir /mnt/hdd/app-storage/electrs 2>/dev/null
sudo chown -R electrs:electrs /mnt/hdd/app-storage/electrs
@ -308,7 +303,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
# https://github.com/romanz/electrs/blob/master/doc/usage.md#configuration-files-and-environment-variables
sudo -u electrs mkdir /home/electrs/.electrs 2>/dev/null
echo "
verbose = 4
verbose = 2
timestamp = true
jsonrpc_import = true
db_dir = \"/mnt/hdd/app-storage/electrs/db\"
@ -386,8 +381,6 @@ stream {
fi
fi
sudo systemctl restart nginx
echo
echo "# Open ports 50001 and 5002 on UFW "
echo
@ -401,7 +394,7 @@ stream {
echo "
[Unit]
Description=Electrs
After=lnd.service
After=bitcoind.service
[Service]
WorkingDirectory=/home/electrs/electrs
@ -438,10 +431,24 @@ WantedBy=multi-user.target
/home/admin/config.scripts/internet.hiddenservice.sh electrs 50002 50002 50001 50001
fi
# restart BTC-RPC-Explorer to reconfigure itself to use electrs for address API
if [ "${BTCRPCexplorer}" == "on" ]; then
sudo systemctl restart btc-rpc-explorer
echo "# BTC-RPC-Explorer restarted"
# whitelist downloading to localhost from bitcoind
if ! sudo grep -Eq "^whitelist=download@127.0.0.1" /mnt/hdd/bitcoin/bitcoin.conf;then
echo "whitelist=download@127.0.0.1" | sudo tee -a /mnt/hdd/bitcoin/bitcoin.conf
bitcoindRestart=yes
fi
source /home/admin/raspiblitz.info
if [ "${state}" == "ready" ]; then
if [ "${bitcoindRestart}" == "yes" ]; then
sudo systemctl restart bitcoind
fi
sudo systemctl restart nginx
sudo systemctl start electrs
# restart BTC-RPC-Explorer to reconfigure itself to use electrs for address API
if [ "${BTCRPCexplorer}" == "on" ]; then
sudo systemctl restart btc-rpc-explorer
echo "# BTC-RPC-Explorer restarted"
fi
fi
echo
@ -481,11 +488,11 @@ if [ "$1" = "0" ] || [ "$1" = "off" ]; then
sudo ufw deny 50002
echo "# OK ElectRS removed."
# restart BTC-RPC-Explorer to reconfigure itself to use electrs for address API
if [ "${BTCRPCexplorer}" == "on" ]; then
sudo systemctl restart btc-rpc-explorer
echo "# BTC-RPC-Explorer restarted"
fi
# restart BTC-RPC-Explorer to reconfigure itself to use electrs for address API
if [ "${BTCRPCexplorer}" == "on" ]; then
sudo systemctl restart btc-rpc-explorer
echo "# BTC-RPC-Explorer restarted"
fi
else
echo "# ElectRS is not installed."

View File

@ -280,7 +280,7 @@ elif [ "$1" = "unlock" ]; then
exit 1
fi
echo "# Waiting to unlock wallet ... "
sleep 5
sleep 15
attempt=$((attempt+1))
done
echo "# Ok the ${netprefix}lightningd wallet is unlocked"

View File

@ -65,7 +65,7 @@ do
# setting info string
infoStr=" Blockchain Progress : ${syncProgress}\n"
if [ "${lightning}" == "lnd" ] || [ "${lightning}" == "cln" ]; then
if [ "${lightning}" == "lnd" ] || [ "${lightning}" == "cln" ]; then
infoStr="${infoStr} Lightning Progress : ${scanProgress}\n ${actionString}"
else
# if lightning is deactivated (leave line clear)