From 72c80aadd4145a1200b2e087393e47d23dc491c1 Mon Sep 17 00:00:00 2001 From: rootzoll Date: Thu, 13 Aug 2020 19:08:35 +0200 Subject: [PATCH] #1438 change checking if electrum ready --- home.admin/config.scripts/bonus.electrs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home.admin/config.scripts/bonus.electrs.sh b/home.admin/config.scripts/bonus.electrs.sh index 8975ef380..c39ede76f 100644 --- a/home.admin/config.scripts/bonus.electrs.sh +++ b/home.admin/config.scripts/bonus.electrs.sh @@ -43,7 +43,7 @@ if [ "$1" = "status" ]; then fi # check if initial sync was done, by setting a file as once electrs is the first time responding on port 50001 - electrumResponding=$(echo exit | telnet 127.0.0.1 50001 2>/dev/null | grep -c "Connected to") + electrumResponding=$(echo '{"jsonrpc":"2.0","method":"server.ping","params":[],"id":"electrs-check"}' | netcat -w 2 127.0.0.1 50001 | grep -c "result") if [ ${electrumResponding} -gt 1 ]; then electrumResponding=1 fi