From 2a418affba9f0c3df699f5c3108b03531453e32d Mon Sep 17 00:00:00 2001 From: Waldek Date: Sun, 21 Feb 2021 08:37:55 +0100 Subject: [PATCH] Update graph.sh --- sysinfo/graph.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sysinfo/graph.sh b/sysinfo/graph.sh index 4e209b3..29cde50 100755 --- a/sysinfo/graph.sh +++ b/sysinfo/graph.sh @@ -5,6 +5,7 @@ # Temperature CPU (not working for VPS) # Disable = false or enable = true create graph fortemperature CPU +# set "false" for VPS tempcpu=true @@ -17,14 +18,16 @@ if [[ -f "$FILE" ]]; then tempC=`cat /sys/class/thermal/thermal_zone0/temp |awk '{printf("%.1f",$1)}'` fi -# For compuers not like Raspberry PI install package + +# For platform not like Raspberry PI install package # apt install lm-sensors # and run: sensors-detect # after this check result run command: sensors to see temperature CPU, if no set above tempcpu=false # Remove when use for Raspberry PI (see above) - +if $tempcpu == "True" ; then tempC=`sensors | grep -i "Core 0" | grep "$1" | sed -re "s/.*:[^+]*?[+]([.0-9]+)[ °]C.*/\1/g"` +fi #=====================================