From: Bernhard Tittelbach Date: Tue, 23 Mar 2010 12:35:20 +0000 (+0000) Subject: grml X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=556feaa3be2413a1bbbb0cf7528f220c27263275;p=svn42.git grml --- diff --git a/sensor_graph/sample_sensors.sh b/sensor_graph/sample_sensors.sh index ed902d5..6474ed5 100755 --- a/sensor_graph/sample_sensors.sh +++ b/sensor_graph/sample_sensors.sh @@ -4,9 +4,9 @@ echo -e "listen sensor\n" | usocket /var/run/powersensordaemon/cmd.sock -n | ./s PID1=$! echo -e "listen movement\n" | usocket /var/run/powersensordaemon/cmd.sock -n >> /tmp/movement.tmp & PID2=$! -trap "kill $PID1 $PID2" 0 +trap "kill $PID1 $PID2" 0 INT QUIT while sleep 30; do - L=$(wc -l /tmp/movement.tmp | cut -d' ' -f1) + L=$(wc -l /tmp/movement.tmp | sed 's/[^0-9]*//g') echo -n > /tmp/movement.tmp rrdtool update /home/sensormovement.rrd -t movement N:$L done