mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2024-11-20 10:12:06 +01:00
#673 detecting more the 1GB RAM & config bitcoind
This commit is contained in:
parent
9ecbcd0d0c
commit
b9a8220003
@ -35,6 +35,14 @@ if [ ${mountOK} -eq 1 ]; then
|
||||
sudo chown -R bitcoin:bitcoin /home/bitcoin/.lnd
|
||||
echo "OK - ${network} setup ready"
|
||||
|
||||
###### OPTIMIZE IF RAM >1GB
|
||||
kbSizeRAM=$(cat /proc/meminfo | grep "MemTotal" | sed 's/[^0-9]*//g')
|
||||
if [ ${kbSizeRAM} -gt 1500000 ]; then
|
||||
echo "Detected RAM >1GB --> optimizing ${network}.conf"
|
||||
sudo sed -i "s/^dbcache=.*/dbcache=600/g" /mnt/hdd/${network}/${network}.conf
|
||||
sudo sed -i "s/^maxmempool=.*/maxmempool=300/g" /mnt/hdd/${network}/${network}.conf
|
||||
fi
|
||||
|
||||
###### ACTIVATE TOR IF SET DURING SETUP
|
||||
if [ "${runBehindTor}" = "on" ]; then
|
||||
echo "TOR was selected ..."
|
||||
|
@ -57,6 +57,14 @@ fi
|
||||
sudo rm -rf /etc/ssh >> ${logFile} 2>&1
|
||||
sudo ln -s /mnt/hdd/ssh /etc/ssh >> ${logFile} 2>&1
|
||||
|
||||
# optimze if RAM >1GB
|
||||
kbSizeRAM=$(cat /proc/meminfo | grep "MemTotal" | sed 's/[^0-9]*//g')
|
||||
if [ ${kbSizeRAM} -gt 1500000 ]; then
|
||||
echo "Detected RAM >1GB --> optimizing ${network}.conf"
|
||||
sudo sed -i "s/^dbcache=.*/dbcache=600/g" /mnt/hdd/${network}/${network}.conf
|
||||
sudo sed -i "s/^maxmempool=.*/maxmempool=300/g" /mnt/hdd/${network}/${network}.conf
|
||||
fi
|
||||
|
||||
# link and copy HDD content into new OS
|
||||
echo "Link HDD content for user bitcoin" >> ${logFile}
|
||||
sudo chown -R bitcoin:bitcoin /mnt/hdd/lnd >> ${logFile} 2>&1
|
||||
|
Loading…
Reference in New Issue
Block a user