generating TLS by starting lnd directly

This commit is contained in:
rootzoll 2018-12-22 00:43:49 +01:00
parent 317658c11f
commit f4aabbf273

View File

@ -113,8 +113,9 @@ fi
echo "deleting TLSCert"
sudo rm /mnt/hdd/lnd/tls.* 2>/dev/null
echo "let lnd generate new TLSCert"
sudo systemctl restart lnd
echo "wait until generated"
sudo -u bitcoin /usr/local/bin/lnd &>/dev/null &
lndPID=$(jobs -l | grep '/usr/local/bin/lnd' | cut -d ' ' -f3)
echo "wait until generated lndPID(${lndPID})"
newCertExists=0
count=0
while [ ${newCertExists} -eq 0 ]
@ -128,6 +129,7 @@ do
newCertExists=$(sudo ls /mnt/hdd/lnd/tls.cert 2>/dev/null | grep -c '.cert')
sleep 2
done
sudo kill -KILL ${lndPID}
echo "copy new cert to admin user"
sudo cp /mnt/hdd/lnd/tls.cert /home/admin/.lnd