mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-04-12 13:49:38 +02:00
Merge branch 'master' of https://github.com/rootzoll/raspiblitz
This commit is contained in:
commit
dc5b13d51d
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,4 @@
|
||||
.DS_Store
|
||||
home.admin/.DS_Store
|
||||
*.log
|
||||
__pycache__
|
||||
|
@ -28,7 +28,7 @@ if [ ${isARM} -eq 0 ]; then
|
||||
fi
|
||||
echo "OK running on Linux ARM architecture."
|
||||
|
||||
# keep in mind thet DietPi for Raspberry is also a stripped down Raspbian
|
||||
# keep in mind that DietPi for Raspberry is also a stripped down Raspbian
|
||||
echo "Detect Base Image ..."
|
||||
baseImage="?"
|
||||
isDietPi=$(uname -n | grep -c 'DietPi')
|
||||
@ -78,7 +78,7 @@ if [ "${baseImage}" = "raspbian" ]; then
|
||||
# set WIFI country so boot does not block
|
||||
sudo raspi-config nonint do_wifi_country US
|
||||
# extra: remove some big packages not needed
|
||||
sudo apt-get remove -y --purge libreoffice*
|
||||
sudo apt-get remove -y --purge libreoffice* oracle-java* chromium-browser nuscratch scratch sonic-pi minecraft-pi python-pygame
|
||||
sudo apt-get clean
|
||||
sudo apt-get -y autoremove
|
||||
fi
|
||||
@ -419,4 +419,4 @@ git clone https://github.com/goodtft/LCD-show.git
|
||||
sudo chmod -R 755 LCD-show
|
||||
sudo chown -R admin:admin LCD-show
|
||||
cd LCD-show/
|
||||
sudo ./LCD35-show
|
||||
sudo ./LCD35-show
|
||||
|
@ -8,6 +8,7 @@ color_red='\033[0;31m'
|
||||
color_green='\033[0;32m'
|
||||
color_yellow='\033[0;33m'
|
||||
color_gray='\033[0;37m'
|
||||
color_purple='\033[0;35m'
|
||||
|
||||
# load network
|
||||
network=`sudo cat /home/admin/.network`
|
||||
@ -125,7 +126,10 @@ torInfo=""
|
||||
# Version
|
||||
networkVersion=$(${network}-cli -datadir=${bitcoin_dir} -version 2>/dev/null | cut -d ' ' -f6)
|
||||
# TOR or IP
|
||||
networkInfo=$(${network}-cli -datadir=${bitcoin_dir} getnetworkinfo)
|
||||
onionAddress=$(echo ${networkInfo} | jq -r '.localaddresses [0] .address')
|
||||
networkConnections=$(echo ${networkInfo} | jq -r '.connections')
|
||||
networkConnectionsInfo="${color_purple}${networkConnections} ${color_gray}connections"
|
||||
if [ "${onionAddress}" != "null" ]; then
|
||||
# TOR address
|
||||
public_addr="${onionAddress}:${public_port}"
|
||||
@ -165,20 +169,22 @@ else
|
||||
if [ ${#ln_getInfo} -eq 0 ]; then
|
||||
ln_baseInfo="${color_red} Not Started | Not Ready Yet"
|
||||
else
|
||||
item=$(sudo -u bitcoin tail -n 100 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log 2> /dev/null | grep "(height" | tail -n1 | awk '{print $10} {print $11} {print $12}' | tr -dc '0-9')
|
||||
item=$(sudo -u bitcoin tail -n 100 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log 2> /dev/null | grep "(height" | tail -n1 | awk '{print $10} {print $11} {print $12}' | tr -dc '0-9')
|
||||
total=$(sudo -u bitcoin ${network}-cli -datadir=/home/bitcoin/.${network} getblockchaininfo 2>/dev/null | jq -r '.blocks')
|
||||
ln_baseInfo="${color_red} waiting for chain sync"
|
||||
if [ ${#item} -gt 0 ]; then
|
||||
ln_channelInfo="scanning ${item}/${total}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
else
|
||||
ln_walletbalance="$(sudo -u bitcoin /usr/local/bin/lncli --macaroonpath=${lnd_macaroon_dir}/readonly.macaroon --tlscertpath=${lnd_dir}/tls.cert walletbalance | jq -r '.confirmed_balance')" 2>/dev/null
|
||||
ln_channelbalance="$(sudo -u bitcoin /usr/local/bin/lncli --macaroonpath=${lnd_macaroon_dir}/readonly.macaroon --tlscertpath=${lnd_dir}/tls.cert channelbalance | jq -r '.balance')" 2>/dev/null
|
||||
ln_channels_online="$(echo "${ln_getInfo}" | jq -r '.num_active_channels')" 2>/dev/null
|
||||
ln_channels_total="$(sudo -u bitcoin /usr/local/bin/lncli --macaroonpath=${lnd_macaroon_dir}/readonly.macaroon --tlscertpath=${lnd_dir}/tls.cert listchannels | jq '.[] | length')" 2>/dev/null
|
||||
ln_baseInfo="${color_gray}wallet ${ln_walletbalance} sat"
|
||||
ln_peers="$(echo "${ln_getInfo}" | jq -r '.num_peers')" 2>/dev/null
|
||||
ln_channelInfo="${ln_channels_online}/${ln_channels_total} Channels ${ln_channelbalance} sat"
|
||||
ln_peersInfo="${color_purple}${ln_peers} ${color_gray}peers"
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -195,10 +201,10 @@ ${color_yellow} ,' / ${color_gray}Free Mem ${color_ram}${ram} ${color_g
|
||||
${color_yellow} ,' /_____, ${color_gray}ssh admin@${color_green}${local_ip}${color_gray} ▼${network_rx} ▲${network_tx}
|
||||
${color_yellow} .'____ ,' ${color_gray}${webinterfaceInfo}
|
||||
${color_yellow} / ,' ${color_gray}${network} ${color_green}${networkVersion} ${chain}net ${color_gray}Sync ${sync_color}${sync} (%s)
|
||||
${color_yellow} / ,' ${color_gray}Public ${public_color}${public_addr} ${public}
|
||||
${color_yellow} / ,' ${color_gray}Public ${public_color}${public_addr} ${public} ${networkConnectionsInfo}
|
||||
${color_yellow} /,' ${color_gray}
|
||||
${color_yellow} /' ${color_gray}LND ${color_green}v0.5-beta ${ln_baseInfo}
|
||||
${color_yellow} ${color_gray}${ln_channelInfo}
|
||||
${color_yellow} ${color_gray}${ln_channelInfo} ${ln_peersInfo}
|
||||
${color_yellow}
|
||||
${color_yellow}${ln_external}
|
||||
" \
|
||||
|
2
home.admin/00infoBlitz2.sh
Executable file
2
home.admin/00infoBlitz2.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
/usr/bin/env python3 infoblitzd.py $@
|
@ -137,7 +137,7 @@ while :
|
||||
if [ ${#clienterror} -gt 0 ]; then
|
||||
l1="Waiting for ${network}d to get ready.\n"
|
||||
l2="---> Starting Up\n"
|
||||
l3="Can take longer if devcie was off."
|
||||
l3="Can take longer if device was off."
|
||||
isVerifying=$(echo "${clienterror}" | grep -c 'Verifying blocks')
|
||||
if [ ${isVerifying} -gt 0 ]; then
|
||||
l2="---> Verifying Blocks\n"
|
||||
|
@ -41,7 +41,7 @@ waitUntilChainNetworkIsReady()
|
||||
if [ ${#clienterror} -gt 0 ]; then
|
||||
l1="Waiting for ${network}d to get ready.\n"
|
||||
l2="---> Starting Up\n"
|
||||
l3="Can take longer if devcie was off."
|
||||
l3="Can take longer if device was off."
|
||||
isVerifying=$(echo "${clienterror}" | grep -c 'Verifying blocks')
|
||||
if [ ${isVerifying} -gt 0 ]; then
|
||||
l2="---> Verifying Blocks\n"
|
||||
@ -285,4 +285,4 @@ case $CHOICE in
|
||||
./AAunlockLND.sh
|
||||
./00mainMenu.sh
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
|
@ -223,7 +223,7 @@ targetPath2="${targetDir}/${updateTorrentFile}"
|
||||
echo ""
|
||||
echo "*** Moving Files ***"
|
||||
date +%s
|
||||
echo "can take some minutes ... öease wait"
|
||||
echo "can take some minutes... please wait"
|
||||
|
||||
sudo mkdir /mnt/hdd/bitcoin 2>/dev/null
|
||||
sudo mv ${targetPath1}/* /mnt/hdd/bitcoin/
|
||||
|
@ -50,6 +50,7 @@ while [ ${chainIsReady} -eq 0 ]
|
||||
echo ""
|
||||
else
|
||||
echo "OK - chainnetwork is working"
|
||||
echo ""
|
||||
chainIsReady=1
|
||||
break
|
||||
fi
|
||||
@ -189,8 +190,10 @@ if [ ${macaroonExists} -eq 0 ]; then
|
||||
sudo cp /home/bitcoin/.lnd/data/chain/${network}/${chain}net/admin.macaroon /home/admin/.lnd/data/chain/${network}/${chain}net
|
||||
sudo chown -R admin:admin /home/admin/.lnd/
|
||||
echo "OK - LND Macaroons created"
|
||||
echo ""
|
||||
else
|
||||
echo "OK - Macaroons are already copied"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
###### Unlock Wallet (if needed)
|
||||
|
@ -123,7 +123,7 @@ if [ ${isRunning} -eq 1 ]; then
|
||||
echo "killing screen session PID(${sessionPID})"
|
||||
# kill all child processes of screen sceesion
|
||||
pkill -P ${sessionPID}
|
||||
echo "proccesses klilled"
|
||||
echo "processes killed"
|
||||
sleep 3
|
||||
# tell the screen session to quit and wait a bit
|
||||
screen -S ${name} -X quit 1>/dev/null
|
||||
@ -168,4 +168,4 @@ else
|
||||
# continue setup
|
||||
./60finishHDD.sh
|
||||
|
||||
fi
|
||||
fi
|
||||
|
1584
home.admin/infoblitzd.py
Executable file
1584
home.admin/infoblitzd.py
Executable file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user