LNDConnect will use locally calculated local IP

This commit is contained in:
Taylor Helsper 2019-11-09 09:32:48 -06:00
parent 5e9f8d589d
commit 7a0b2b0bae

View File

@ -29,11 +29,12 @@ while true; do
# Find URLs
LND_TOR_ADDR=$(cat /var/lib/tor/mynode/hostname | awk '{print $1}')
LOCAL_IP_ADDR=$(hostname -I | head -n 1)
# Generate QR Codes
lndconnect --lnddir=/mnt/hdd/mynode/lnd -o --bitcoin.mainnet --localip
lndconnect --lnddir=/mnt/hdd/mynode/lnd -o --bitcoin.mainnet --host=$LOCAL_IP_ADDR
cp -f lndconnect-qr.png lndconnect_local_grpc.png
lndconnect --lnddir=/mnt/hdd/mynode/lnd -o --bitcoin.mainnet --localip -p 10080
lndconnect --lnddir=/mnt/hdd/mynode/lnd -o --bitcoin.mainnet --host=$LOCAL_IP_ADDR -p 10080
cp -f lndconnect-qr.png lndconnect_local_rest.png
lndconnect --lnddir=/mnt/hdd/mynode/lnd -o --bitcoin.mainnet --host=$LND_TOR_ADDR
cp -f lndconnect-qr.png lndconnect_tor_grpc.png
@ -41,13 +42,13 @@ while true; do
cp -f lndconnect-qr.png lndconnect_tor_rest.png
# Generate Text Files
lndconnect --lnddir=/mnt/hdd/mynode/lnd -j --bitcoin.mainnet --localip > lndconnect_local_grpc.txt
lndconnect --lnddir=/mnt/hdd/mynode/lnd -j --bitcoin.mainnet --localip -p 10080 > lndconnect_local_rest.txt
lndconnect --lnddir=/mnt/hdd/mynode/lnd -j --bitcoin.mainnet --host=$LOCAL_IP_ADDR > lndconnect_local_grpc.txt
lndconnect --lnddir=/mnt/hdd/mynode/lnd -j --bitcoin.mainnet --host=$LOCAL_IP_ADDR -p 10080 > lndconnect_local_rest.txt
lndconnect --lnddir=/mnt/hdd/mynode/lnd -j --bitcoin.mainnet --host=$LND_TOR_ADDR > lndconnect_tor_grpc.txt
lndconnect --lnddir=/mnt/hdd/mynode/lnd -j --bitcoin.mainnet --host=$LND_TOR_ADDR -p 10080 > lndconnect_tor_rest.txt
echo "Done! Waiting until LND changes, then regen lndconnect codes!"
inotifywait -e modify -e create -e delete $LND_TLS_CERT_FILE $LND_ADMIN_MACAROON_FILE
echo "Done! Waiting until LND changes, then regen lndconnect codes! (or 24 hours)"
inotifywait -t 86400 -e modify -e create -e delete $LND_TLS_CERT_FILE $LND_ADMIN_MACAROON_FILE
done
# Should never exit