|
|
@ -139,14 +139,16 @@ elif [ "${exportType}" = "reset" ]; then |
|
|
|
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 "- restarting LND ... wait 20 secs" |
|
|
|
sudo systemctl start lnd |
|
|
|
sleep 20 |
|
|
|
lncli unlock |
|
|
|
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." |
|
|
|
echo "OK DONE" |
|
|
|
|
|
|
|
else |
|
|
|
echo "FAIL: unknown '${exportType}' -run-> ./lnd.export.sh -h" |
|
|
|