mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-27 12:06:36 +02:00
#2667 fix
This commit is contained in:
@@ -475,15 +475,12 @@ do
|
|||||||
finishedIBD=$($bitcoincli_alias getblockchaininfo | grep "initialblockdownload" | grep -c "false")
|
finishedIBD=$($bitcoincli_alias getblockchaininfo | grep "initialblockdownload" | grep -c "false")
|
||||||
if [ ${finishedIBD} -eq 1 ]; then
|
if [ ${finishedIBD} -eq 1 ]; then
|
||||||
|
|
||||||
echo "CHECK FOR END OF IBD --> reduce RAM, check TOR and restart ${network}d"
|
echo "CHECK FOR END OF IBD --> reduce RAM for next reboot"
|
||||||
|
|
||||||
# remove flag
|
# remove flag
|
||||||
sudo rm /home/admin/selfsync.flag
|
sudo rm /mnt/hdd/${network}/blocks/selfsync.flag
|
||||||
|
|
||||||
# stop bitcoind
|
# set dbcache back to normal (to give room for other apps after reboot in the future)
|
||||||
sudo systemctl stop ${network}d
|
|
||||||
|
|
||||||
# set dbcache back to normal (to give room for other apps)
|
|
||||||
kbSizeRAM=$(sudo cat /proc/meminfo | grep "MemTotal" | sed 's/[^0-9]*//g')
|
kbSizeRAM=$(sudo cat /proc/meminfo | grep "MemTotal" | sed 's/[^0-9]*//g')
|
||||||
if [ ${kbSizeRAM} -gt 1500000 ]; then
|
if [ ${kbSizeRAM} -gt 1500000 ]; then
|
||||||
echo "Detected RAM >1GB --> optimizing ${network}.conf"
|
echo "Detected RAM >1GB --> optimizing ${network}.conf"
|
||||||
@@ -493,17 +490,6 @@ do
|
|||||||
sudo sed -i "s/^dbcache=.*/dbcache=128/g" /mnt/hdd/${network}/${network}.conf
|
sudo sed -i "s/^dbcache=.*/dbcache=128/g" /mnt/hdd/${network}/${network}.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# if TOR was activated during setup make sure bitcoin runs behind TOR latest from now on
|
|
||||||
if [ "${runBehindTor}" = "on" ]; then
|
|
||||||
echo "TOR is ON -> make sure bitcoin is running behind TOR after IBD"
|
|
||||||
sudo /home/admin/config.scripts/internet.tor.sh btcconf-on
|
|
||||||
else
|
|
||||||
echo "TOR is OFF after IBD"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# restart bitcoind
|
|
||||||
sudo systemctl start ${network}d
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user