fix lnd config on migration

This commit is contained in:
rootzoll 2021-10-07 13:57:03 +02:00
parent b8ffa0129a
commit b9f207fcf3
4 changed files with 13 additions and 1 deletions

View file

@ -45,6 +45,10 @@ if [ "${err}" != "" ]; then
exit 3
fi
# make sure for the rest of the seup info is set correctly
sudo sed -i "s/^network=.*/network=bitcoin/g" ${infoFile}
sudo sed -i "s/^chain=.*/chain=main/g" ${infoFile}
# set Password B
echo "## SETTING PASSWORD B" >> ${logFile}
if [ "${setPasswordB}" == "1" ]; then

View file

@ -245,11 +245,16 @@ if [ "${lightning}" == "lnd" ]; then
echo "WARN: /mnt/hdd/lnd/lnd.conf not found" >> ${logFile}
fi
# backup old lnd conf
sudo cp /mnt/hdd/lnd/lnd.conf /home/admin/lnd.conf.prebackup2
# start LND service
echo "Starting LND Service ..." >> ${logFile}
sudo systemctl enable lnd >> ${logFile}
sudo systemctl start lnd >> ${logFile}
# backup old lnd conf
sudo cp /mnt/hdd/lnd/lnd.conf /home/admin/lnd.conf.prebackup3
elif [ "${lightning}" == "cl" ]; then

View file

@ -86,7 +86,7 @@ if [ "$1" == "prestart" ]; then
# [bitcoind]
sectionName="[Bb]itcoind"
if [ "${network}" != "bitcoin" ]; then
if [ "${network}" != "bitcoin" ] && [ "${network}" != "" ]; then
sectionName="${network}d"
fi
echo "# [${sectionName}] config ..."

View file

@ -9,6 +9,9 @@ source /home/admin/raspiblitz.info
SETUPFILE="/var/cache/raspiblitz/temp/raspiblitz.setup"
source ${SETUPFILE}
# make sure also admin user can write to log
sudo chmod 777 /home/admin/raspiblitz.log
############################################
# SHOW SEED WORDS AFTER SETUP
if [ "${lightning}" == "lnd" ]; then