This commit is contained in:
12600k-rog-d4
2026-08-13 22:49:50 +08:00
parent 5e296bfe19
commit 2aaaa16ae2
24 changed files with 1415 additions and 327 deletions

View File

@@ -1,4 +1,8 @@
TEMP_LOG=/tmp/auto-check-temp.log
> "$TEMP_LOG"
(while true; do sensors 2>/dev/null | grep -i 'temp\|core\|cpu' | head -5 >> "$TEMP_LOG"; sleep "${AUTOCHECK_TEMP_INTERVAL:-10}"; done) &
(while true; do
T=$(sensors 2>/dev/null | grep -oP '\+?\d+(\.\d+)?(?=°C)' | head -1)
[ -n "$T" ] && echo "$T" >> "$TEMP_LOG"
sleep "${AUTOCHECK_TEMP_INTERVAL:-10}"
done) &
TEMP_PID=$!