projects
/
svn42.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2890b45
)
sample movement fix
author
Bernhard Tittelbach
<xro@realraum.at>
Sun, 21 Mar 2010 00:30:23 +0000
(
00:30
+0000)
committer
Bernhard Tittelbach
<xro@realraum.at>
Sun, 21 Mar 2010 00:30:23 +0000
(
00:30
+0000)
sensor_graph/sample_sensors.sh
patch
|
blob
|
history
diff --git
a/sensor_graph/sample_sensors.sh
b/sensor_graph/sample_sensors.sh
index
bc666fb
..
ed902d5
100755
(executable)
--- a/
sensor_graph/sample_sensors.sh
+++ b/
sensor_graph/sample_sensors.sh
@@
-1,6
+1,10
@@
#!/bin/sh
+sleep 2
echo -e "listen sensor\n" | usocket /var/run/powersensordaemon/cmd.sock -n | ./sample_sensor.lua &>/dev/null &
-echo -e "listen movement\n" | usocket /var/run/powersensordaemon/cmd.sock -n > /tmp/movement.tmp &
+PID1=$!
+echo -e "listen movement\n" | usocket /var/run/powersensordaemon/cmd.sock -n >> /tmp/movement.tmp &
+PID2=$!
+trap "kill $PID1 $PID2" 0
while sleep 30; do
L=$(wc -l /tmp/movement.tmp | cut -d' ' -f1)
echo -n > /tmp/movement.tmp