Improve on last commit
Use runit custom control scripts to end child processes
This commit is contained in:
parent
93e5fa8956
commit
03536a69c9
3 changed files with 4 additions and 8 deletions
3
modules/rhizo_base/files/etc/sv/meas-json/control/t
Executable file
3
modules/rhizo_base/files/etc/sv/meas-json/control/t
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
pkill -P `cat /etc/sv/meas-json/supervise/pid`
|
||||
exit 0
|
|
@ -1,10 +1,6 @@
|
|||
#!/bin/bash
|
||||
exec 2>&1
|
||||
|
||||
if [ -a /tmp/json_socket ]; then
|
||||
killall ncat
|
||||
killall meas_json
|
||||
rm -f /tmp/json_socket
|
||||
fi
|
||||
|
||||
exec /etc/sv/meas-json/scr | ncat -l -U /tmp/json_socket -k --send-only
|
||||
exec chpst -P /bin/sh -c '/usr/bin/stdbuf -oL /usr/bin/meas_json | ncat -l -U /tmp/json_socket -k --send-only'
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
exec 2>&1
|
||||
exec /usr/bin/stdbuf -oL /usr/bin/meas_json
|
Loading…
Add table
Add a link
Reference in a new issue