@ -41,7 +41,7 @@ echo ""
echo "*** CHECK BASE IMAGE ***"
# armv7=32Bit , armv8=64Bit
echo "Check if Linux ARM based ..."
echo "Detect CPU architecture ..."
isARM=$(uname -m | grep -c 'arm')
isAARCH64=$(uname -m | grep -c 'aarch64')
isX86_64=$(uname -m | grep -c 'x86_64')
@ -50,7 +50,11 @@ lnd_macaroon_dir="/home/bitcoin/.lnd/data/chain/${network}/${chain}net"
load=$(w | head -n 1 | cut -d 'v' -f2 | cut -d ':' -f2)
# get CPU temp
cpu=0
if [ ${isX86_64} -eq 0 ] ; then
cpu=$(cat /sys/class/thermal/thermal_zone0/temp)
fi
tempC=$((cpu/1000))
tempF=$(((cpu/1000) * (9/5) + 32))
@ -21,7 +21,11 @@ localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1
echo "localIP='${localip}'"
# temp
tempC=0
tempC=$(echo "scale=1; $(cat /sys/class/thermal/thermal_zone0/temp)/1000" | bc)
echo "tempCelsius='${tempC}'"
# uptime in seconds