From 678ae1081dae6041c4afd33cfec01bd7e4064a83 Mon Sep 17 00:00:00 2001 From: Meliox <5264368+Meliox@users.noreply.github.com> Date: Fri, 5 Jul 2024 21:09:54 +0200 Subject: [PATCH] Add support for one more AMD variant (#66) Fixes #64 --- pve-mod-gui-sensors.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pve-mod-gui-sensors.sh b/pve-mod-gui-sensors.sh index ada4f17..58745d2 100644 --- a/pve-mod-gui-sensors.sh +++ b/pve-mod-gui-sensors.sh @@ -152,11 +152,15 @@ function configure { elif (echo "$sensorsOutput" | grep -q "k10temp-"); then # AMD CPU # Find and set temperature search criteria - if (echo "$sensorsOutput" | grep -A 4 "$item" | grep -q -e "Tctl" -e "Tccd"); then + if (echo "$sensorsOutput" | grep -A 10 "$item" | grep -q "Tctl" && echo "$sensorsOutput" | grep -A 10 "$item" | grep -q "Tccd"); then CPU_ADDRESS_PREFIX=$item CPU_ITEM_PREFIX="Tccd" CPU_TEMP_CAPTION="Temp" - elif (echo "$sensorsOutput" | grep -A 4 "$item" | grep -q "temp"); then + elif (echo "$sensorsOutput" | grep -A 10 "$item" | grep -q -e "\"Tctl\""); then + CPU_ADDRESS_PREFIX=$item + CPU_ITEM_PREFIX="Tctl" + CPU_TEMP_CAPTION="Temp" + elif (echo "$sensorsOutput" | grep -A 10 "$item" | grep -q "\"temp1\""); then CPU_ADDRESS_PREFIX=$item CPU_ITEM_PREFIX="temp" CPU_TEMP_CAPTION="Temp"