svscan — starts and monitors a collection of services
svscan
[
]directory
svscan starts one supervise(1) process for each subdirectory of the current directory, up to a limit of 1000 subdirectories. svscan skips subdirectory names starting with dots. supervise(1) must be in svscan's path.
svscan optionally starts a pair of supervise(1) processes, one for a subdirectory
, one for s
, with a pipe between them.
It does this if the name s
/log
is at most 255 bytes long and s
exists.
(In versions 0.70 and below, it does this if s
/log
is sticky.)
svscan needs two free descriptors for each pipe.
s
Every five seconds, svscan checks for subdirectories again.
If it sees a new subdirectory, it starts a new supervise(1) process.
If it sees an old subdirectory where a supervise(1) process has exited, it restarts the supervise(1) process.
In the log
case it reuses the same pipe so that no data is lost.
svscan is designed to run forever. If it has trouble creating a pipe or running supervise(1), it prints a message to stderr; it will try again five seconds later.
If svscan is given a command-line argument
, it switches to that directory
when it starts.
directory