diff --git a/home.admin/config.scripts/bonus.fullynoded.sh b/home.admin/config.scripts/bonus.fullynoded.sh index 995c8a399..2897352a6 100755 --- a/home.admin/config.scripts/bonus.fullynoded.sh +++ b/home.admin/config.scripts/bonus.fullynoded.sh @@ -12,11 +12,23 @@ source /mnt/hdd/raspiblitz.conf # extract RPC credentials from bitcoin.conf - store only in var RPC_USER=$(sudo cat /mnt/hdd/bitcoin/bitcoin.conf | grep rpcuser | cut -c 9-) PASSWORD_B=$(sudo cat /mnt/hdd/bitcoin/bitcoin.conf | grep rpcpassword | cut -c 13-) -hiddenService=$(sudo cat /mnt/hdd/tor/bitcoin8332/hostname) + +if [ $(${chain}net) = mainnet ];then + BITCOINRPCPORT=8332 +elif [ $(${chain}net) = testnet ];then + BITCOINRPCPORT=18332 +elif [ $(${chain}net) = signet ];then + BITCOINRPCPORT=38332 +fi + +# check and set up the HS +/home/admin/config.scripts/internet.hiddenservice.sh bitcoin${BITCOINRPCPORT} ${BITCOINRPCPORT} ${BITCOINRPCPORT} + +hiddenService=$(sudo cat /mnt/hdd/tor/bitcoin${BITCOINRPCPORT}/hostname) # btcstandup://:@:/?label= -quickConnect="btcstandup://$RPC_USER:$PASSWORD_B@$hiddenService:8332/?label=$hostname" -echo "" +quickConnect="btcstandup://$RPC_USER:$PASSWORD_B@$hiddenService:${BITCOINRPCPORT}/?label=$hostname" +echo echo "scan the QR Code with Fully Noded to connect to your node:" /home/admin/config.scripts/blitz.display.sh qr "${quickConnect}" qrencode -t ANSI256 $quickConnect