From ae003dc806933a0add582b851027e8417191ce15 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Fri, 5 Aug 2022 11:09:25 -0700 Subject: [PATCH] Wait for bitcoind and ord to become available --- deploy/setup | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/deploy/setup b/deploy/setup index b339192370..c0fce084da 100755 --- a/deploy/setup +++ b/deploy/setup @@ -35,7 +35,11 @@ cp deploy/bitcoind.service /etc/systemd/system/ systemctl daemon-reload systemctl enable bitcoind systemctl restart bitcoind -sleep 1 + +while [[ ! -f /var/lib/bitcoind/signet/.cookie ]]; do + echo Waiting for bitcoind… + sleep 1 +done setfacl -m ord:x /var/lib/bitcoind setfacl -dm ord:r /var/lib/bitcoind @@ -48,5 +52,7 @@ cp target/release/ord /usr/local/bin/ord systemctl enable ord systemctl restart ord -sleep 1 -curl https://signet.ordinals.com/list +while ! curl --fail https://signet.ordinals.com/status; do + echo Waiting for ord… + sleep 1 +done