set rights on lnd.conf

This commit is contained in:
rootzoll 2021-10-07 14:32:07 +02:00
parent b9f207fcf3
commit 9726c25907
2 changed files with 8 additions and 8 deletions

View file

@ -179,8 +179,9 @@ if [ "${lightning}" == "lnd" ]; then
configExists=$(sudo ls /mnt/hdd/lnd/lnd.conf | grep -c '.conf')
if [ ${configExists} -eq 1 ]; then
# backup old lnd conf
sudo cp /mnt/hdd/lnd/lnd.conf /home/admin/lnd.conf.prebackup
# make sure correct file permisions are set
sudo chown bitcoin:bitcoin /mnt/hdd/lnd/lnd.conf
sudo chmod 664 /mnt/hdd/lnd/lnd.conf
# make sure additional values are added to [Application Options] since v1.7
echo "- lnd.conf --> checking additional [Application Options] since v1.7" >> ${logFile}
@ -245,17 +246,11 @@ 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
echo "Install C-lightning on update" >> ${logFile}

View file

@ -68,6 +68,11 @@ migrate_lnd_conf () {
# start from fresh configuration template (user will set password B on recovery)
sudo cp /home/admin/assets/lnd.bitcoin.conf /mnt/hdd/lnd/lnd.conf
sudo sed -i "s/^alias=.*/alias=${nodename}/g" /mnt/hdd/lnd/lnd.conf
# make sure correct file permisions are set
sudo chown bitcoin:bitcoin /mnt/hdd/lnd/lnd.conf
sudo chmod 664 /mnt/hdd/lnd/lnd.conf
}
migrate_raspiblitz_conf () {