mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-21 14:11:06 +02:00
#2499 move .force file to raspiblitz.conf in code
This commit is contained in:
@@ -398,16 +398,6 @@ if [ ${cmdlineExists} -eq 1 ] && [ ${#hddAdapterUSB} -gt 0 ] && [ ${hddAdapterUS
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Skipping UASP deactivation ... cmdlineExists(${cmdlineExists}) hddAdapterUSB(${hddAdapterUSB}) hddAdapterUSAP(${hddAdapterUSAP})" >> $logFile
|
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
|
fi
|
||||||
|
|
||||||
# check if the HDD is auto-mounted ( auto-mounted = setup-done)
|
# 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
|
# update public IP on boot - set to domain if available
|
||||||
/home/admin/config.scripts/internet.sh update-publicip ${lndAddress}
|
/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
|
# MAKE SURE USERS HAVE LATEST LND CREDENTIALS
|
||||||
#################################
|
#################################
|
||||||
|
@@ -390,7 +390,7 @@ if [ "$1" = "status" ]; then
|
|||||||
hddAdapterUSAP=1
|
hddAdapterUSAP=1
|
||||||
echo "uaspForced=1"
|
echo "uaspForced=1"
|
||||||
fi
|
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
|
hddAdapterUSAP=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user