From 8a79a8747fe6388caefb85d8642b8834dd17afe7 Mon Sep 17 00:00:00 2001 From: rootzoll Date: Thu, 16 Sep 2021 17:23:18 +0200 Subject: [PATCH] add more debug info --- home.admin/config.scripts/bonus.btc-rpc-explorer.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/home.admin/config.scripts/bonus.btc-rpc-explorer.sh b/home.admin/config.scripts/bonus.btc-rpc-explorer.sh index aeb2717ea..cfc1adce7 100755 --- a/home.admin/config.scripts/bonus.btc-rpc-explorer.sh +++ b/home.admin/config.scripts/bonus.btc-rpc-explorer.sh @@ -123,6 +123,10 @@ if [ "$1" = "prestart" ]; then # check if electrs is installed & running if [ "${ElectRS}" == "on" ]; then + # CHECK THAT ELECTRS IS PART OF CONFIG + echo "# updating BTCEXP_ADDRESS_API=electrumx" + sed -i 's/^BTCEXP_ADDRESS_API=*/BTCEXP_ADDRESS_API=electrumx/g' /home/btcrpcexplorer/.config/btc-rpc-explorer.env + # CHECK THAT ELECTRS INDEX IS BUILD (WAITLOOP) # electrs listening in port 50001 means index is build echo "# electrs is on .. checking if index is build" @@ -130,14 +134,12 @@ if [ "$1" = "prestart" ]; then while [ $(netstat | grep -c "50001") -eq 0 ]; do sleep 1 done - - # CHECK THAT ELECTRS IS PART OF CONFIG - sed -i 's/^BTCEXP_ADDRESS_API=*/BTCEXP_ADDRESS_API=electrumx/g' /home/btcrpcexplorer/.config/btc-rpc-explorer.env - echo "# electrs started, launching BTC-RPC-Explorer ..." + else # ELECTRS=OFF --> MAKE SURE IT IS NOT CONNECTED + echo "# updating BTCEXP_ADDRESS_API=none" sed -i 's/^BTCEXP_ADDRESS_API=*/BTCEXP_ADDRESS_API=none/g' /home/btcrpcexplorer/.config/btc-rpc-explorer.env fi