]> git.plutz.net Git - rpi_small/blobdiff - sensors/hatch.sh
support for one-wire termal sensor
[rpi_small] / sensors / hatch.sh
diff --git a/sensors/hatch.sh b/sensors/hatch.sh
new file mode 100755 (executable)
index 0000000..6cf7560
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+sock=/tmp/oktopus.sock
+
+rm "$sock"
+
+( cd "${0%/*}/"
+  for n in ./sensor_*.sh; do
+    $n &
+  done
+  for n in ekg pulse oxygen heartrate systole diastole; do
+    ./gummikraken.sh ./gummikraken.data $n &
+  done
+) | teesock "$sock" &
+
+for n in 1 2 3 4 5 6 7 8 9 0; do [ ! -S "$sock" ] && sleep 1; done
+chmod a+rw "$sock"