initial commit

This commit is contained in:
Marios Andreopoulos 2013-02-20 03:34:27 +02:00
parent 0fd82965b1
commit a182f4998b

28
scripts/mledcputemp Executable file

@ -0,0 +1,28 @@
#!/bin/bash
LOWTEMP=46
HIGHTEMP=53
REFRESHRATE=1
LEDCONTROLLER="/usr/bin/ledcontroller"
while (true); do
temperature="$(sensors|grep 'id 0'|sed -e 's/\.0.*//' -e 's/.*+//')"
if (( "$temperature" <= "$LOWTEMP" )); then
$LEDCONTROLLER blue;
elif (( "$temperature" < "$HIGHTEMP" )); then
$LEDCONTROLLER green;
else $LEDCONTROLLER red;
fi;
sleep "$REFRESHRATE";
done