new thermal-alert crontab script.

This commit is contained in:
2020-04-16 20:39:10 +00:00
parent 9bba4fa6da
commit 1bf404181e
3 changed files with 19 additions and 1 deletions
+15
View File
@@ -0,0 +1,15 @@
#!/bin/bash
LOCATION=`dirname "$0"`
source "${LOCATION}/../config.sh"
if (( `cat /sys/class/thermal/thermal_zone0/temp` > ( $THERMAL_ALERT * 1000 ) )); then
echo "thermal above ${THERMAL_ALERT} C"
source "${LOCATION}/../thermal.sh"
${LOCATION}/../discord.sh thermal `${LOCATION}/../thermal.sh`
else
echo "thermal below ${THERMAL_ALERT} C"
source "${LOCATION}/../thermal.sh"
fi