Browse Source

also refresh macaroons db

dev
rootzoll 6 years ago
parent
commit
fe9a377516
  1. 3
      home.admin/config.scripts/lnd.export.sh

3
home.admin/config.scripts/lnd.export.sh

@ -136,11 +136,14 @@ elif [ "${exportType}" = "reset" ]; then
cd
echo "- deleting old macaroons"
sudo rm /home/bitcoin/.lnd/data/chain/${network}/${chain}net/*.macaroon
sudo rm /home/bitcoin/.lnd/data/chain/${network}/${chain}net/macaroons.db
echo "- resetting TLS cert"
sudo /home/admin/config.scripts/lnd.newtlscert.sh
echo "- copy new macaroons to admin user"
sudo cp /home/bitcoin/.lnd/data/chain/${network}/${chain}net/*.macaroon /home/admin/.lnd/data/chain/${network}/${chain}net/
sudo cp /home/bitcoin/.lnd/data/chain/${network}/${chain}net/macaroons.db /home/admin/.lnd/data/chain/${network}/${chain}net/
sudo chown admin:admin -R /home/admin/.lnd/data/chain/${network}/${chain}net/*.macaroon
sudo chown admin:admin /home/admin/.lnd/data/chain/${network}/${chain}net/macaroons.db
echo "- restarting LND"
sudo systemctl start lnd 2>/dev/null
echo "OK DONE - LND is restarting - you may need to unlock wallet again."

Loading…
Cancel
Save