Make lnbits use macaroon path rather than hex

This commit is contained in:
Taylor Helsper 2022-10-16 22:23:48 -05:00
parent 5c0b07e571
commit 4d096cc398
2 changed files with 10 additions and 5 deletions

View File

@ -13,7 +13,14 @@ ExecStartPre=/usr/bin/wait_on_lnd.sh
ExecStartPre=/usr/bin/service_scripts/pre_lnbits.sh
WorkingDirectory=/opt/mynode/lnbits
ExecStart=/usr/bin/docker run --rm --name lnbits-legend -p 5000:5000 --volume /opt/mynode/lnbits/.env:/app/.env --volume /mnt/hdd/mynode/lnbits/:/app/data --volume /mnt/hdd/mynode/lnd/tls.cert:/app/tls.cert lnbits-legend
ExecStart=/usr/bin/docker run --rm \
--name lnbits-legend \
-p 5000:5000 \
--volume /opt/mynode/lnbits/.env:/app/.env \
--volume /mnt/hdd/mynode/lnbits/:/app/data \
--volume /mnt/hdd/mynode/lnd/tls.cert:/app/tls.cert \
--volume /mnt/hdd/mynode/lnd/data/chain/bitcoin/mainnet/admin.macaroon:/app/admin.macaroon \
lnbits-legend
ExecStop=/usr/bin/docker stop -t 2 lnbits-legend
User=bitcoin

View File

@ -4,9 +4,7 @@ set -x
# Generate hex macaroons
macaroonAdminHex=$(xxd -ps -u -c 1000 /mnt/hdd/mynode/lnd/data/chain/bitcoin/mainnet/admin.macaroon)
#macaroonAdminHex=$(xxd -ps -u -c 1000 /mnt/hdd/mynode/lnd/data/chain/bitcoin/mainnet/admin.macaroon)
# Update env file
sed -i "s/^LND_REST_MACAROON=.*/LND_REST_MACAROON=${macaroonAdminHex}/g" /opt/mynode/lnbits/.env
#sed -i "s/^LND_REST_INVOICE_MACAROON=.*/LND_REST_INVOICE_MACAROON=${macaroonInvoiceHex}/g" /opt/mynode/lnbits/.env
#sed -i "s/^LND_REST_READ_MACAROON=.*/LND_REST_READ_MACAROON=${macaroonReadHex}/g" /opt/mynode/lnbits/.env
sed -i "s|^LND_REST_MACAROON=.*|LND_REST_MACAROON=\"/app/admin.macaroon\"|g" /opt/mynode/lnbits/.env