#892 link instead of copy macaroons/tls

This commit is contained in:
rootzoll 2020-01-16 12:23:19 +01:00
parent ed727cb549
commit 6473e19d00
2 changed files with 6 additions and 9 deletions

View File

@ -98,15 +98,11 @@ EOF
# remove minimize, maximize, close from titlebar
sudo sed -i -E 's/titleLayout>LIMC/titleLayout>L/g' /etc/xdg/openbox/lxde-pi-rc.xml
# Copy over the macaroons
sudo mkdir -p /home/pi/.lnd/data/chain/bitcoin/mainnet/
sudo chmod 700 /home/pi/.lnd/
sudo ln -nsf /home/admin/.lnd/tls.cert /home/pi/.lnd/
sudo cp /home/admin/.lnd/data/chain/bitcoin/mainnet/readonly.macaroon /home/pi/.lnd/data/chain/bitcoin/mainnet/
sudo cp /home/admin/.lnd/data/chain/bitcoin/mainnet/invoice.macaroon /home/pi/.lnd/data/chain/bitcoin/mainnet/
sudo chmod 600 /home/pi/.lnd/data/chain/bitcoin/mainnet/readonly.macaroon
sudo chmod 600 /home/pi/.lnd/data/chain/bitcoin/mainnet/invoice.macaroon
sudo chown -R pi:pi /home/pi/.lnd/
# link over the macaroons/tls to pi user
# invoice & read macarrons have permissions to be read by pi user
# and just linking the base directory it should be flexible to work also with testnet or litecoin
sudo rm -r /home/pi/.lnd 2>/dev/null
sudo ln -s /mnt/hdd/lnd /home/pi/.lnd
# rotate touchscreen based on if LCD is rotated
if [ "${lcdrotate}" = "1" ]; then

View File

@ -26,6 +26,7 @@ do
sleep 2
done
sudo killall /usr/local/bin/lnd
sudo chmod 664 /mnt/hdd/lnd/tls.cert
echo "copy new cert to admin user"
sudo cp /mnt/hdd/lnd/tls.cert /home/admin/.lnd
sudo chown admin:admin -R /home/admin/.lnd/*.cert