On 2015-12-26 18:09, Steve Litt wrote:
#!/bin/sh exec /usr/bin/inotifywait /dev/disk | /usr/local/bin/automounter.py
You can't supervise a pipeline per se; you need to supervise both processes in the pipeline independently, and make sure the pipe isn't broken when one of them dies. So, have "exec inotifywait /dev/disk" as foobar/run, and have "exec automounter.py" as foobar/log/run. This will work with daemontools, runit and s6. (You can accomplish the same goal with perp and nosh too; the syntax will just be different.) Alternatively, you could use s6-rc and create the "inotifywait" and "automounter" longrun services in a pipeline; your compiled database would then include instructions to set up the supervised pipeline for you. This is more complex to set up than just using the integrated pipe management in svscan and runsvdir, but it's also more powerful, because you can pipeline an arbitrary number of processes that way (this is also what nosh does). -- Laurent
