also refresh macaroons db

This commit is contained in:
rootzoll 2019-01-21 20:49:13 +01:00
parent 7132a1effa
commit fe9a377516

View File

@ -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."