From a13dd67e9371f35d58a3cd09ebf01f1ddb5599d9 Mon Sep 17 00:00:00 2001 From: rootzoll Date: Thu, 16 Sep 2021 19:23:38 +0200 Subject: [PATCH] restart btc-rpc-explorer if installed --- home.admin/config.scripts/bonus.electrs.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/home.admin/config.scripts/bonus.electrs.sh b/home.admin/config.scripts/bonus.electrs.sh index f24d5cbc1..2fd4715ba 100755 --- a/home.admin/config.scripts/bonus.electrs.sh +++ b/home.admin/config.scripts/bonus.electrs.sh @@ -438,6 +438,12 @@ WantedBy=multi-user.target /home/admin/config.scripts/internet.hiddenservice.sh electrs 50002 50002 50001 50001 fi + # restart BTC-RPC-Explorer to reconfigure itself to use electrs for address API + if [ "${BTCRPCexplorer}" == "on" ]; then + sudo systemctl restart btc-rpc-explorer + echo "# BTC-RPC-Explorer restarted" + fi + echo echo "# To connect through SSL from outside of the local network make sure the port 50002 is forwarded on the router" echo @@ -474,6 +480,12 @@ if [ "$1" = "0" ] || [ "$1" = "off" ]; then sudo ufw deny 50001 sudo ufw deny 50002 echo "# OK ElectRS removed." + + # restart BTC-RPC-Explorer to reconfigure itself to use electrs for address API + if [ "${BTCRPCexplorer}" == "on" ]; then + sudo systemctl restart btc-rpc-explorer + echo "# BTC-RPC-Explorer restarted" + fi else echo "# ElectRS is not installed."