From 8f7b549db3b70e830dda5dc2ecbfb4b7b8952401 Mon Sep 17 00:00:00 2001 From: rootzoll Date: Wed, 22 Aug 2018 11:34:15 +0200 Subject: [PATCH] show node address in main menu --- home.admin/00mainMenu.sh | 5 ++++- home.admin/20initDialog.sh | 1 - home.admin/96addTorService.sh | 31 ++++++++++++++++++------------- home.admin/assets/getpublicip.sh | 5 +++-- home.admin/assets/lnd.tor.service | 7 +++++++ 5 files changed, 32 insertions(+), 17 deletions(-) diff --git a/home.admin/00mainMenu.sh b/home.admin/00mainMenu.sh index 32076c2..0d56de6 100755 --- a/home.admin/00mainMenu.sh +++ b/home.admin/00mainMenu.sh @@ -60,6 +60,9 @@ else else + # set node address as backtitle + BACKTITLE=$(lncli getinfo | grep "uris" -A 2 | tr -d '\n' | cut -d '"' -f4) + chain=$(${network}-cli -datadir=/home/bitcoin/.${network} getblockchaininfo | jq -r '.chain') switchOption="to MAINNET" if [ "${chain}" = "main" ]; then @@ -86,7 +89,7 @@ else fi torInstalled=$(sudo ls /mnt/hdd/tor/lnd9735/hostname 2>/dev/null | grep 'hostname' -c) if [ ${torInstalled} -eq 0 ]; then - OPTIONS+=(TOR "Make reachable thru TOR") + OPTIONS+=(TOR "Make reachable thru TOR") else OPTIONS+=(NYX "Monitor TOR") fi diff --git a/home.admin/20initDialog.sh b/home.admin/20initDialog.sh index e483535..38bf87d 100755 --- a/home.admin/20initDialog.sh +++ b/home.admin/20initDialog.sh @@ -75,7 +75,6 @@ while [ ${#result} -lt 8 ] sed -i "s/^rpcpassword=.*/rpcpassword=${result}/g" /home/admin/assets/${network}.conf sed -i "s/^${network}d.rpcpass=.*/${network}d.rpcpass=${result}/g" /home/admin/assets/lnd.${network}.conf - # success info dialog dialog --backtitle "RaspiBlitz - SetUP" --msgbox "OK - RPC password changed to '$result'\n\nNow starting the Setup of your RaspiBlitz." 7 52 clear diff --git a/home.admin/96addTorService.sh b/home.admin/96addTorService.sh index dc4c353..efaa06c 100644 --- a/home.admin/96addTorService.sh +++ b/home.admin/96addTorService.sh @@ -7,6 +7,7 @@ # load network network=`cat .network` +chain="$(${network}-cli getblockchaininfo | jq -r '.chain')" # location of TOR config torrc="/etc/tor/torrc" @@ -64,7 +65,7 @@ sudo mkdir /mnt/hdd/tor/sys sudo mkdir /mnt/hdd/tor/web80 sudo mkdir /mnt/hdd/tor/lnd9735 sudo chmod -R 700 /mnt/hdd/tor -sudo chown -R debian-tor:debian-tor /mnt/hdd/tor +sudo chown -R bitcoin:bitcoin /mnt/hdd/tor cat > ./torrc <