mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-11-19 02:22:24 +01:00
next try
This commit is contained in:
@@ -127,11 +127,13 @@ do
|
|||||||
# building REST command
|
# building REST command
|
||||||
walletPasswordBase64=$(cat /root/lnd.autounlock.pwd | tr -d '\n' | base64 -w0)
|
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)"
|
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
|
# execute REST call
|
||||||
echo "${command}"
|
#echo "${command}"
|
||||||
result=$($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}"
|
echo "${result}"
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user