mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-24 14:51:03 +01:00
Merge pull request #48 from vnnkl/44-addShango
WIP: script for Shango in local LAN
This commit is contained in:
commit
f76ae7c3cf
1 changed files with 37 additions and 0 deletions
37
home.admin/97-addShango.sh
Normal file
37
home.admin/97-addShango.sh
Normal file
|
@ -0,0 +1,37 @@
|
|||
#!/bin/bash
|
||||
|
||||
# location of lnd.conf
|
||||
lnd_config=/home/bitcoin/.lnd/lnd.conf
|
||||
|
||||
# we assume usage in LAN -> shango in safe mode
|
||||
|
||||
# append config
|
||||
echo "rpclisten=0.0.0.0:10009" | sudo tee -a ${lnd_config}
|
||||
|
||||
# allow in firewall
|
||||
sudo ufw allow from 192.168.0.0/24 to any port 10009 comment 'allow LND grpc from local LAN'
|
||||
|
||||
# delete certificates as they need to be recreated with correct settings
|
||||
sudo rm /home/bitcoin/.lnd/tls.*
|
||||
# copy over certificates to admin
|
||||
sudo cp /home/bitcoin/.lnd/tls.cert /home/admin/.lnd
|
||||
|
||||
# enable fw
|
||||
sudo ufw enable
|
||||
|
||||
# restart lnd
|
||||
sudo systemctl restart lnd
|
||||
|
||||
# unlock wallet
|
||||
lncli unlock
|
||||
|
||||
# add qrcode-encoder to pass info
|
||||
sudo apt-get install qrencode -y
|
||||
|
||||
cd /home/admin/.lnd
|
||||
# save LAN IP
|
||||
myip="ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p'"
|
||||
|
||||
# display qr code
|
||||
echo -e "${myip},\n$(xxd -p -c2000 admin.macaroon)," > qr.txt && cat tls.cert >>qr.txt && qrencode -t ANSIUTF8 < qr.txt
|
||||
|
Loading…
Add table
Reference in a new issue