This commit is contained in:
openoms
2021-09-21 20:01:34 +01:00
4 changed files with 27 additions and 19 deletions

View File

@@ -25,6 +25,7 @@
- Update: Thunderhub v0.12.25 [details](https://github.com/apotdevin/thunderhub/releases/tag/v0.12.25) - Update: Thunderhub v0.12.25 [details](https://github.com/apotdevin/thunderhub/releases/tag/v0.12.25)
- Update: Pool CLI v0.5.1-alpha [details](https://github.com/lightninglabs/pool/releases/tag/v0.5.1-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: Balance of Satoshis 10.7.8 (BOS) + keep data on reinstall [details](https://github.com/alexbosworth/balanceofsatoshis/blob/master/CHANGELOG.md#version-8010)
- Update: Channel Tools (chantools) v0.9.3 [details](https://github.com/guggero/chantools/blob/master/README.md)
- Update: Circuitbreaker v0.3.0 [details](https://github.com/lightningequipment/circuitbreaker/blob/master/README.md) - Update: Circuitbreaker v0.3.0 [details](https://github.com/lightningequipment/circuitbreaker/blob/master/README.md)
- Remove: DropBox Backup (its recommended to change to Nextcloud Backup) - Remove: DropBox Backup (its recommended to change to Nextcloud Backup)

View File

@@ -665,13 +665,6 @@ if [ ${isMounted} -eq 0 ]; then
sed -i "s/^message=.*/message='Setup Done'/g" ${infoFile} sed -i "s/^message=.*/message='Setup Done'/g" ${infoFile}
fi fi
# make sure for future starts that blockchain service gets started after bootstrap
# so deamon reloas needed ... system will go into reboot after last loop
# needs to be after wait loop because otherwise the "restart" on COPY OVER LAN will not work
echo "# Updating service ${network}d.service ..." >> $logFile
sudo sed -i "s/^Wants=.*/Wants=bootstrap.service/g" /etc/systemd/system/${network}d.service
sudo sed -i "s/^After=.*/After=bootstrap.service/g" /etc/systemd/system/${network}d.service
source ${infoFile} source ${infoFile}
echo "WAIT LOOP: FINAL SETUP .. see controlFinalDialog.sh" >> $logFile echo "WAIT LOOP: FINAL SETUP .. see controlFinalDialog.sh" >> $logFile
until [ "${state}" == "ready" ] until [ "${state}" == "ready" ]
@@ -694,6 +687,13 @@ if [ ${isMounted} -eq 0 ]; then
######################################## ########################################
# AFTER FINAL SETUP TASKS # AFTER FINAL SETUP TASKS
# make sure for future starts that blockchain service gets started after bootstrap
# so deamon reloas needed ... system will go into reboot after last loop
# needs to be after wait loop because otherwise the "restart" on COPY OVER LAN will not work
echo "# Updating service ${network}d.service ..." >> $logFile
sudo sed -i "s/^Wants=.*/Wants=bootstrap.service/g" /etc/systemd/system/${network}d.service
sudo sed -i "s/^After=.*/After=bootstrap.service/g" /etc/systemd/system/${network}d.service
# delete setup data from RAM # delete setup data from RAM
sudo rm ${setupFile} sudo rm ${setupFile}

View File

@@ -5,13 +5,16 @@
# see https://github.com/guggero/chantools/releases # see https://github.com/guggero/chantools/releases
lndVersion=$(lncli -v | cut -d " " -f 3 | cut -d"." -f2) lndVersion=$(lncli -v | cut -d " " -f 3 | cut -d"." -f2)
if [ $lndVersion -eq 12 ]; then if [ $lndVersion -eq 13 ]; then
pinnedVersion="0.9.3"
elif [ $lndVersion -eq 12 ]; then
pinnedVersion="0.8.2" pinnedVersion="0.8.2"
elif [ $lndVersion -eq 11 ]; then elif [ $lndVersion -eq 11 ]; then
pinnedVersion="0.7.1" pinnedVersion="0.7.1"
else else
echo "# LND not installed or a version not tested with chantools" echo "# LND not installed or a version not tested with chantools"
lncli -v lncli -v
exit 1
fi fi
# command info # command info
@@ -82,7 +85,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
sudo -u admin wget -N https://github.com/guggero/chantools/releases/download/v${pinnedVersion}/${binaryName} sudo -u admin wget -N https://github.com/guggero/chantools/releases/download/v${pinnedVersion}/${binaryName}
# check binary was not manipulated (checksum test) # check binary was not manipulated (checksum test)
sudo -u admin wget -N https://github.com/guggero/chantools/releases/download/v${pinnedVersion}/manifest-v${pinnedVersion}.txt.asc sudo -u admin wget -N https://github.com/guggero/chantools/releases/download/v${pinnedVersion}/manifest-v${pinnedVersion}.txt.sig
sudo -u admin wget --no-check-certificate -N -O "${downloadDir}/pgp_keys.asc" ${PGPpkeys} sudo -u admin wget --no-check-certificate -N -O "${downloadDir}/pgp_keys.asc" ${PGPpkeys}
binaryChecksum=$(sha256sum ${binaryName} | cut -d " " -f1) binaryChecksum=$(sha256sum ${binaryName} | cut -d " " -f1)
if [ "${binaryChecksum}" != "${SHA256}" ]; then if [ "${binaryChecksum}" != "${SHA256}" ]; then
@@ -102,7 +105,9 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
fi fi
gpg --import ./pgp_keys.asc gpg --import ./pgp_keys.asc
sleep 3 sleep 3
verifyResult=$(gpg --verify manifest-v${pinnedVersion}.txt.asc 2>&1) echo "# running: gpg --verify manifest-v${pinnedVersion}.txt.sig"
verifyResult=$(gpg --verify manifest-v${pinnedVersion}.txt.sig 2>&1)
echo "# verifyResult(${verifyResult})"
goodSignature=$(echo ${verifyResult} | grep 'Good signature' -c) goodSignature=$(echo ${verifyResult} | grep 'Good signature' -c)
echo "# goodSignature(${goodSignature})" echo "# goodSignature(${goodSignature})"
correctKey=$(echo ${verifyResult} | tr -d " \t\n\r" | grep "${GPGcheck}" -c) correctKey=$(echo ${verifyResult} | tr -d " \t\n\r" | grep "${GPGcheck}" -c)

View File

@@ -1,7 +1,9 @@
#!/bin/bash #!/bin/bash
# https://github.com/romanz/electrs/blob/master/doc/usage.md # https://github.com/romanz/electrs/releases
ELECTRSVERSION="v0.8.12" #ELECTRSVERSION="v0.9.0-rc1"
# https://github.com/romanz/electrs/commits/master
ELECTRSVERSION="3041e89cd2fb377541b929d852ef6298c2d4e60a"
# command info # command info
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
@@ -39,7 +41,7 @@ if [ "$1" = "status" ]; then
if [ ${serviceRunning} -eq 1 ]; then if [ ${serviceRunning} -eq 1 ]; then
# Experimental try to get sync Info # Experimental try to get sync Info
syncedToBlock=$(sudo journalctl -u electrs --no-pager -n2000 | grep "new headers from height" | tail -n 1 | cut -d " " -f 16 | sed 's/[^0-9]*//g') syncedToBlock=$(sudo journalctl -u electrs --no-pager -n2000 | grep "height=" | tail -n1| cut -d= -f3)
blockchainHeight=$(sudo -u bitcoin ${network}-cli getblockchaininfo 2>/dev/null | jq -r '.headers' | sed 's/[^0-9]*//g') blockchainHeight=$(sudo -u bitcoin ${network}-cli getblockchaininfo 2>/dev/null | jq -r '.headers' | sed 's/[^0-9]*//g')
lastBlockchainHeight=$(($blockchainHeight -1)) lastBlockchainHeight=$(($blockchainHeight -1))
syncProgress=0 syncProgress=0
@@ -91,7 +93,7 @@ if [ "$1" = "status" ]; then
# no answer on that port # no answer on that port
echo "publicTCPPortAnswering=0" echo "publicTCPPortAnswering=0"
fi fi
echo "portHTTP='50002'" echo "portSSL='50002'"
localPortRunning=$(sudo netstat -an | grep -c '0.0.0.0:50002') localPortRunning=$(sudo netstat -an | grep -c '0.0.0.0:50002')
echo "localHTTPPortActive=${localPortRunning}" echo "localHTTPPortActive=${localPortRunning}"
publicPortRunning=$(nc -z -w6 ${publicip} 50002 2>/dev/null; echo $?) publicPortRunning=$(nc -z -w6 ${publicip} 50002 2>/dev/null; echo $?)
@@ -104,13 +106,13 @@ if [ "$1" = "status" ]; then
fi fi
# add TOR info # add TOR info
if [ "${runBehindTor}" == "on" ]; then if [ "${runBehindTor}" == "on" ]; then
echo "TORrunning=1" echo "TorRunning=1"
if [ "$2" = "showAddress" ]; then if [ "$2" = "showAddress" ]; then
TORaddress=$(sudo cat /mnt/hdd/tor/electrs/hostname) TORaddress=$(sudo cat /mnt/hdd/tor/electrs/hostname)
echo "TORaddress='${TORaddress}'" echo "TORaddress='${TORaddress}'"
fi fi
else else
echo "TORrunning=0" echo "TorRunning=0"
fi fi
# check Nginx # check Nginx
nginxTest=$(sudo nginx -t 2>&1 | grep -c "test is successful") nginxTest=$(sudo nginx -t 2>&1 | grep -c "test is successful")
@@ -193,12 +195,12 @@ Check 'sudo nginx -t' for a detailed error message.
echo echo
echo "On Network Settings > Server menu:" echo "On Network Settings > Server menu:"
echo "- deactivate automatic server selection" echo "- deactivate automatic server selection"
echo "- as manual server set '${localip}' & '${portHTTP}'" echo "- as manual server set '${localip}' & '${portSSL}'"
echo "- laptop and RaspiBlitz need to be within same local network" echo "- laptop and RaspiBlitz need to be within same local network"
echo echo
echo "To start directly from laptop terminal use:" echo "To start directly from laptop terminal use:"
echo "electrum --oneserver --server ${localip}:${portHTTP}:s" echo "electrum --oneserver --server ${localip}:${portSSL}:s"
if [ ${TORrunning} -eq 1 ]; then if [ ${TorRunning} -eq 1 ]; then
echo echo
echo "The Tor Hidden Service address for electrs is (see LCD for QR code):" echo "The Tor Hidden Service address for electrs is (see LCD for QR code):"
echo "${TORaddress}" echo "${TORaddress}"