From f87333191b7d3b7378a4741ea0a3c3d6a16c2b09 Mon Sep 17 00:00:00 2001 From: RD WebDesign Date: Sat, 23 Sep 2023 21:52:41 -0300 Subject: [PATCH] Use `unset` to reset CPU temp variable on each iteration Signed-off-by: RD WebDesign --- padd.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/padd.sh b/padd.sh index 505b1cba..ed40bdad 100755 --- a/padd.sh +++ b/padd.sh @@ -160,6 +160,9 @@ GetSystemInformation() { # System uptime system_uptime_raw=$(uptime) + # reset $cpu variable + unset cpu + # CPU temperature if [ -d "/sys/devices/platform/coretemp.0/hwmon/" ]; then cpu=$(cat "$(find /sys/devices/platform/coretemp.0/hwmon/ -maxdepth 2 -name "temp1_input" 2>/dev/null | head -1)" 2>/dev/null)