home
/
code
/
khatus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
81f8162
)
Run sanity_check sensors as children and pre-kill all existing
author
Siraaj Khandkar
<siraaj@khandkar.net>
Thu, 14 Feb 2019 20:26:46 +0000
(15:26 -0500)
committer
Siraaj Khandkar
<siraaj@khandkar.net>
Thu, 14 Feb 2019 20:26:46 +0000
(15:26 -0500)
x4/sanity_check
patch
|
blob
|
blame
|
history
diff --git
a/x4/sanity_check
b/x4/sanity_check
index
8100c2f
..
036d4b9
100755
(executable)
--- a/
x4/sanity_check
+++ b/
x4/sanity_check
@@
-6,11
+6,13
@@
set -e
dir="${prefix}/${host}"
dir="${prefix}/${host}"
-kill_sensor() {
- if test -f "$1"
- then
- kill $(cat "$1")
- fi
+kill_all() {
+ for pid_file in $(find $dir -type f -name pid)
+ do
+ kill -9 $(cat $pid_file) || true
+ rm $pid_file
+ done
+ pkill khatus_x4
}
read_sensor() {
}
read_sensor() {
@@
-22,13
+24,11
@@
read_sensor() {
fi
}
fi
}
-kill_sensor ${dir}/khatus_x4_sensor_datetime/pid
-kill_sensor ${dir}/khatus_x4_sensor_mpd/pid
-kill_sensor ${dir}/khatus_x4_sensor_energy/pid
+kill_all
-./bin/khatus_x4_sensor_datetime
-d
-./bin/khatus_x4_sensor_mpd
-d
-./bin/khatus_x4_sensor_energy
-d
+./bin/khatus_x4_sensor_datetime
&
+./bin/khatus_x4_sensor_mpd
&
+./bin/khatus_x4_sensor_energy
&
while :
do
while :
do
This page took
0.027073 seconds
and
4
git commands to generate.