From df4fc168f5ad7359ffb4c7cbb89bec31b600702e Mon Sep 17 00:00:00 2001 From: Andrew Stowell Date: Thu, 17 Feb 2022 16:26:34 +0000 Subject: [PATCH] made thermal.sh command have the zone be configurable. --- config.example.sh | 5 ++++- thermal.sh | 8 ++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/config.example.sh b/config.example.sh index d408fb1..ce8a930 100644 --- a/config.example.sh +++ b/config.example.sh @@ -1,8 +1,11 @@ -!/bin/bash +#!/bin/bash # degrees in C THERMAL_ALERT=75 +# see: /sys/class/thermal/thermal_zone* +THERMAL_ZONE=0 + STORAGE_MONITOR=("/") # must declare associated array explicitly diff --git a/thermal.sh b/thermal.sh index 6789af7..263cfb0 100755 --- a/thermal.sh +++ b/thermal.sh @@ -1,10 +1,14 @@ #!/bin/bash +LOCATION=`dirname "$0"` + +source "${LOCATION}/config.sh" + # this is currently specific to raspberry-pi # since that is the only kind of physical server I have # TODO make this work with all temp in class/thermal -name=$(