make status scan use ram disk instead of hdd temp

This commit is contained in:
rootzoll 2021-08-26 13:39:43 +02:00
parent c459a0f5cf
commit e82e6d839a

View File

@ -21,10 +21,6 @@ fi
# measure time of scan
startTime=$(date +%s)
# macke sure temp folder on HDD is available and fro all usable
sudo mkdir /mnt/hdd/temp 2>/dev/null
sudo chmod 777 -R /mnt/hdd/temp 2>/dev/null
# localIP
localip=$(hostname -I | awk '{print $1}')
echo "localIP='${localip}'"
@ -54,11 +50,11 @@ echo "bitcoinActive=${bitcoinRunning}"
if [ ${bitcoinRunning} -eq 1 ]; then
# get blockchain info
$bitcoincli_alias getblockchaininfo 1>/mnt/hdd/temp/.bitcoind.out 2>/mnt/hdd/temp/.bitcoind.error
$bitcoincli_alias getblockchaininfo 1>/var/cache/raspiblitz/.bitcoind.out 2>/var/cache/raspiblitz/.bitcoind.error
# check if error on request
blockchaininfo=$(cat /mnt/hdd/temp/.bitcoind.out 2>/dev/null)
bitcoinError=$(cat /mnt/hdd/temp/.bitcoind.error 2>/dev/null)
#rm /mnt/hdd/temp/.bitcoind.error 2>/dev/null
blockchaininfo=$(cat /var/cache/raspiblitz/.bitcoind.out 2>/dev/null)
bitcoinError=$(cat /var/cache/raspiblitz/.bitcoind.error 2>/dev/null)
#rm /var/cache/raspiblitz/.bitcoind.error 2>/dev/null
if [ ${#bitcoinError} -gt 0 ]; then
bitcoinErrorShort=$(echo ${bitcoinError/error*:/} | sed 's/[^a-zA-Z0-9 ]//g')
echo "bitcoinErrorShort='${bitcoinErrorShort}'"
@ -143,12 +139,12 @@ if [ ${lndRunning} -eq 1 ]; then
# get LND info
lndRPCReady=1
lndinfo=$($lncli_alias getinfo 2>/mnt/hdd/temp/.lnd.error)
lndinfo=$($lncli_alias getinfo 2>/var/cache/raspiblitz/.lnd.error)
# check if error on request
lndErrorFull=$(cat /mnt/hdd/temp/.lnd.error 2>/dev/null)
lndErrorFull=$(cat /var/cache/raspiblitz/.lnd.error 2>/dev/null)
lndErrorShort=''
#rm /mnt/hdd/temp/.lnd.error 2>/dev/null
#rm /var/cache/raspiblitz/.lnd.error 2>/dev/null
if [ ${#lndErrorFull} -gt 0 ]; then