#2499 move .force file to raspiblitz.conf in code

This commit is contained in:
rootzoll 2021-09-09 12:51:50 +02:00
parent b7102bd446
commit ddf9762f3d
2 changed files with 12 additions and 11 deletions

View file

@ -398,16 +398,6 @@ if [ ${cmdlineExists} -eq 1 ] && [ ${#hddAdapterUSB} -gt 0 ] && [ ${hddAdapterUS
fi
else
echo "Skipping UASP deactivation ... cmdlineExists(${cmdlineExists}) hddAdapterUSB(${hddAdapterUSB}) hddAdapterUSAP(${hddAdapterUSAP})" >> $logFile
if [ ${uaspForced} -eq 1 ]; then
# Add to raspiblitz.conf if not already there
entryExists=$(cat /mnt/hdd/raspiblitz.conf 2>/dev/null | grep -c 'forceUasp=on')
if [ ${entryExists} -eq 0 ]; then
sudo sed -i '/forceUasp=.*/d' /mnt/hdd/raspiblitz.conf
echo "forceUasp=on" >> /mnt/hdd/raspiblitz.conf
echo "DONE forceUasp=on recorded in raspiblitz.conf" >> $logFile
fi
fi
fi
# check if the HDD is auto-mounted ( auto-mounted = setup-done)
@ -774,6 +764,17 @@ source ${configFile}
# update public IP on boot - set to domain if available
/home/admin/config.scripts/internet.sh update-publicip ${lndAddress}
# make constant UASP entry in raspiblitz.conf if still done by flag file
# uaspForced comes from blitz.datadrive.sh status
if [ ${uaspForced} -eq 1 ]; then
entryExists=$(cat /mnt/hdd/raspiblitz.conf 2>/dev/null | grep -c 'forceUasp=on')
if [ ${entryExists} -eq 0 ]; then
sudo sed -i '/forceUasp=.*/d' /mnt/hdd/raspiblitz.conf
echo "forceUasp=on" >> /mnt/hdd/raspiblitz.conf
echo "DONE forceUasp=on recorded in raspiblitz.conf" >> $logFile
fi
fi
#################################
# MAKE SURE USERS HAVE LATEST LND CREDENTIALS
#################################

View file

@ -390,7 +390,7 @@ if [ "$1" = "status" ]; then
hddAdapterUSAP=1
echo "uaspForced=1"
fi
if [ $(grep -c "forceUasp=on" < /mnt/hdd/raspiblitz.conf) -eq 1 ]; then
if [ $(cat /mnt/hdd/raspiblitz.conf 2>/dev/null | grep -c "forceUasp=on") -eq 1 ]; then
hddAdapterUSAP=1
fi