Browse Source

Merge pull request #48 from rootzoll/master

sync with @rootzoll
master
bluecell296 6 years ago
committed by GitHub
parent
commit
fcb82b7aa0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      README.md
  2. 2
      WORKSHOP.md
  3. 8
      home.admin/00raspiblitz.sh
  4. 2
      home.admin/70initLND.sh
  5. 4
      home.admin/91addBonus.sh
  6. 2
      home.admin/AAunlockLND.sh
  7. 2
      home.admin/_bootstrap.sh
  8. 8
      home.admin/config.scripts/blitz.statusscan.sh
  9. 2
      home.admin/config.scripts/network.reindex.sh

10
README.md

@ -44,9 +44,15 @@ The RaspiBlitz is build from the following parts:
**All together under 160 USD / 140 EUR (depending on country & shop)**
## Amazon Shopping Lists
### Buy a ready-2-go RaspiBlitz (Germany, EU and International)
These are the community currated shopping lists based on country:
If you like to support the RaspiBlitz project you can order a ready-2-go RaspiBlitz or a all-you-need-hardwareset for yourself or for your RaspiBlitz workshop from [raspiblitz.com](https://raspiblitz.com) *(pay with Bitcoin/Lightning or with deprecated PayPal/CreditCard)*
*To list your local/national RaspiBlitz shop here or on raspiblitz.com, get in contact: christian@fulmo.org*
### International Shopping Lists (buy parts & build it yourself)
The cheapest way is to buy ans assemble the single parts yourself. These are the community currated shopping lists based on country:
* [Germany](shoppinglist_de.md) *(reference shopping list)*
* [USA](shoppinglist_usa.md)

2
WORKSHOP.md

@ -121,6 +121,8 @@ See the shopping list on the RaspiBlitz Github README - you need to buy all of t
From experience start ordering two weeks before the workshop (if you need to assembly) and minimum one week if you handing out hardware kits - even if you have Amazon Prime. There is always a shipment comming late - its a lot of packages.
If you like to support the RaspiBlitz project you can order a ready-2-go RaspiBlitz or a all-you-need-hardwareset for your RaspiBlitz workshop from [raspiblitz.com](https://raspiblitz.com)
## Instruct Participants to bring Hardware
If you run the scenario of people bringing their own hardware. Make sure to let them know at least a week before the event so that there is enough time for online ordering. Also make sure that especially the power supply needs to provide 3A and a stable current (big fat with a thick cable is good) - because thats the most often error source if people just reuse some old weak power supply.

8
home.admin/00raspiblitz.sh

@ -80,10 +80,10 @@ if [ "${state}" = "presync" ]; then
# stopping the pre-sync
echo ""
# analyse if blockchain was detected broken by pre-sync
blockchainBroken=$(sudo tail /mnt/hdd/bitcoin/debug.log | grep -c "Please restart with -reindex or -reindex-chainstate to recover.")
blockchainBroken=$(sudo tail /mnt/hdd/bitcoin/debug.log 2>/dev/null | grep -c "Please restart with -reindex or -reindex-chainstate to recover.")
if [ ${blockchainBroken} -eq 1 ]; then
# dismiss if its just a date thing
futureBlock=$(sudo tail /mnt/hdd/bitcoin/debug.log | grep "Please restart with -reindex or -reindex-chainstate to recover." | grep -c "block database contains a block which appears to be from the future")
futureBlock=$(sudo tail /mnt/hdd/bitcoin/debug.log 2>/dev/null | grep "Please restart with -reindex or -reindex-chainstate to recover." | grep -c "block database contains a block which appears to be from the future")
if [ ${futureBlock} -gt 0 ]; then
blockchainBroken=0
echo "-> Ignore reindex - its just a future block"
@ -172,10 +172,10 @@ waitUntilChainNetworkIsReady()
if [ ${#clienterror} -gt 0 ]; then
# analyse LOGS for possible reindex
reindex=$(sudo cat /mnt/hdd/${network}/debug.log | grep -c 'Please restart with -reindex or -reindex-chainstate to recover')
reindex=$(sudo cat /mnt/hdd/${network}/debug.log 2>/dev/null | grep -c 'Please restart with -reindex or -reindex-chainstate to recover')
if [ ${reindex} -gt 0 ]; then
# dismiss if its just a date thing
futureBlock=$(sudo tail /mnt/hdd/${network}/debug.log | grep "Please restart with -reindex or -reindex-chainstate to recover" | grep -c "block database contains a block which appears to be from the future")
futureBlock=$(sudo tail /mnt/hdd/${network}/debug.log 2>/dev/null | grep "Please restart with -reindex or -reindex-chainstate to recover" | grep -c "block database contains a block which appears to be from the future")
if [ ${futureBlock} -gt 0 ]; then
blockchainBroken=0
echo "-> Ignore reindex - its just a future block"

2
home.admin/70initLND.sh

@ -437,7 +437,7 @@ fi
###### Unlock Wallet (if needed)
echo "*** Check Wallet Lock ***"
locked=$(sudo tail -n 1 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log | grep -c unlock)
locked=$(sudo tail -n 1 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log 2>/dev/null | grep -c unlock)
if [ ${locked} -gt 0 ]; then
echo "OK - Wallet is locked ... starting unlocking dialog"
/home/admin/AAunlockLND.sh

4
home.admin/91addBonus.sh

@ -6,8 +6,8 @@ echo "Creating the command lnbalance as well as lnchannels which will give you a
cd
mkdir /home/admin/tmpScriptDL
cd /home/admin/tmpScriptDL
wget https://raw.githubusercontent.com/Stadicus/guides/master/raspibolt/resources/lnbalance
wget https://raw.githubusercontent.com/Stadicus/guides/master/raspibolt/resources/lnchannels
wget https://stadicus.github.io/RaspiBolt/resources/lnbalance
wget https://stadicus.github.io/RaspiBolt/resources/lnchannels
chmod +x lnbalance
chmod +x lnchannels
sudo cp lnchannels /usr/local/bin

2
home.admin/AAunlockLND.sh

@ -22,7 +22,7 @@ while :
do
sudo -u bitcoin /usr/local/bin/lncli --chain=${network} unlock
sleep 4
locked=$(sudo tail -n 1 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log | grep -c unlock)
locked=$(sudo tail -n 1 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log 2>/dev/null | grep -c unlock)
if [ ${locked} -eq 0 ]; then
break
fi

2
home.admin/_bootstrap.sh

@ -280,7 +280,7 @@ if [ ${hddIsAutoMounted} -eq 0 ]; then
#presyncActive=$(systemctl status bitcoind | grep -c 'could not be found')
echo "starting pre-sync in background" >> $logFile
# make sure that debug file is clean, so just pre-sync gets analysed on stop
sudo rm /mnt/hdd/bitcoin/debug.log
sudo rm /mnt/hdd/bitcoin/debug.log 2>/dev/null
# starting in background, because this scripts is part of systemd
# so to change systemd needs to happen after delay in seperate process
sudo chown -R bitcoin:bitcoin /mnt/hdd/bitcoin 2>> $logFile

8
home.admin/config.scripts/blitz.statusscan.sh

@ -87,7 +87,7 @@ else
#### HARD PROBLEMS
# LOW DISK SPACE
lowDiskSpace=$(sudo tail -n 100 /mnt/hdd/${network}${pathAdd}/debug.log | grep -c "Error: Disk space is low!")
lowDiskSpace=$(sudo tail -n 100 /mnt/hdd/${network}${pathAdd}/debug.log 2>/dev/null | grep -c "Error: Disk space is low!")
if [ ${lowDiskSpace} -gt 0 ]; then
bitcoinErrorShort="HDD DISK SPACE LOW"
bitcoinErrorFull="HDD DISK SPACE LOW - check what data you can delete on HDD and restart"
@ -97,7 +97,7 @@ else
# if still no error identified - search logs for generic error (after 4min uptime)
if [ ${#bitcoinErrorShort} -eq 0 ] && [ ${uptime} -gt 240 ]; then
bitcoinErrorFull=$(sudo tail -n 100 /mnt/hdd/${network}${pathAdd}/debug.log | grep -c "Error:" | tail -1 | tr -d "'")
bitcoinErrorFull=$(sudo tail -n 100 /mnt/hdd/${network}${pathAdd}/debug.log 2>/dev/null | grep -c "Error:" | tail -1 | tr -d "'")
if [ ${#bitcoinErrorFull} -gt 0 ]; then
bitcoinErrorShort="Error found in Logs"
fi
@ -140,10 +140,10 @@ if [ ${lndRunning} -eq 1 ]; then
# find a the line number in logs of start of LND
# just do this on error case to save on processing memory
lndStartLineNumber=$(sudo cat /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log | grep -in "LTND: Active chain:" | tail -1 | cut -d ":" -f1)
lndStartLineNumber=$(sudo cat /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log 2>/dev/null | grep -in "LTND: Active chain:" | tail -1 | cut -d ":" -f1)
# get logs of last LND start
lndLogsAfterStart=$(sudo tail --lines=+${lndStartLineNumber} /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log)
lndLogsAfterStart=$(sudo tail --lines=+${lndStartLineNumber} /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log 2>/dev/null)
# check RPC server ready (can take some time after wallet was unlocked)
lndRPCReady=$(echo "${lndLogsAfterStart}" | grep -c "RPCS: RPC server listening on")

2
home.admin/config.scripts/network.reindex.sh

@ -98,6 +98,6 @@ echo "*************************"
sudo -u bitcoin ${network}-cli stop
sleep 4
# clean logs (to prevent a false reindex detection)
sudo rm /mnt/hdd/${network}/debug.log
sudo rm /mnt/hdd/${network}/debug.log 2>/dev/null
# reboot
sudo shutdown -r now
Loading…
Cancel
Save