From 3e359a436cf54a36edc52ab40ff38a32f33ab3a8 Mon Sep 17 00:00:00 2001 From: /geco Date: Sun, 23 Dec 2018 22:51:02 +0100 Subject: [PATCH] next try --- home.admin/_background.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/home.admin/_background.sh b/home.admin/_background.sh index 0a94e8a..e7e2bb6 100644 --- a/home.admin/_background.sh +++ b/home.admin/_background.sh @@ -127,11 +127,13 @@ do # building REST command walletPasswordBase64=$(cat /root/lnd.autounlock.pwd | tr -d '\n' | base64 -w0) MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 /mnt/hdd/lnd/data/chain/${network}/${chain}net/admin.macaroon)" - command="sudo -u bitcoin curl -X POST -d '{\"wallet_password\": \"${walletPasswordBase64}\"}' --cacert /home/bitcoin/.lnd/tls.cert --header \"$MACAROON_HEADER\" https://localhost:8080/v1/unlockwallet" + #command="sudo -u bitcoin curl -X POST -d '{\"wallet_password\": \"${walletPasswordBase64}\"}' --cacert /home/bitcoin/.lnd/tls.cert --header \"$MACAROON_HEADER\" https://localhost:8080/v1/unlockwallet" # execute REST call - echo "${command}" - result=$($command) + #echo "${command}" + #result=$($command) + POSTDATA="{'wallet_password': '${walletPasswordBase64}'}" + result=$(curl -X POST -d "${POSTDATA}" --cacert /home/bitcoin/.lnd/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/unlockwallet) echo "${result}" else