From c9edd81b738e10d305fea0a62d0c9de449f251c9 Mon Sep 17 00:00:00 2001 From: /geco Date: Sun, 23 Dec 2018 16:01:30 +0100 Subject: [PATCH] output command --- home.admin/_background.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/home.admin/_background.sh b/home.admin/_background.sh index ecc55e3..a6657aa 100644 --- a/home.admin/_background.sh +++ b/home.admin/_background.sh @@ -132,12 +132,16 @@ do macaroonData=$(xxd -ps -u -c 1000 /home/bitcoin/.lnd/data/chain/${network}/${chain}net/admin.macaroon) echo "macaroonData --> ${macaroonData}" - # unlock thru REST call - curl -s \ - -H "Grpc-Metadata-macaroon: ${macaroonData})" \ + # build curl command + curlCommand="curl -s \ + -H \"Grpc-Metadata-macaroon: ${macaroonData})\" \ --cacert /home/bitcoin/.lnd/tls.cert \ - -X POST -d "{\"wallet_password\": \"${walletPasswordBase64}\"}" \ - https://localhost:8080/v1/unlockwallet 2>&1 + -X POST -d \"{\"wallet_password\": \"${walletPasswordBase64}\"}\" \ + https://localhost:8080/v1/unlockwallet 2>&1" + + # execute REST call + echo "running --> ${command}" + result=$($command) else echo "lncli says not locked"