mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-24 22:58:43 +01:00
#2499 move .force file to raspiblitz.conf in code
This commit is contained in:
parent
b7102bd446
commit
ddf9762f3d
2 changed files with 12 additions and 11 deletions
|
@ -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
|
||||
#################################
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue