service-control, svc — control services through their supervision directory API
service-control [commands...] {directories...}
svc [commands...] {directories...}
service-control sends a series of control commands to
services that are being managed by
service-manager(1),
runit's
runsv(1),
s6's
s6-supervise(1),
daemontools'
supervise(1),
or daemontools-encore's
supervise(1).
Each of the directories is either a supervise
directory (see
service-manager(1))
itself or a directory with a supervise directory named supervise within it.
The control commands are determined by command line options given to service-control. Commands are sent in first to last order of the options passed to service-control, and each service is given all commands at once before going onto the next.
Send a 'u' command to bring the service up, if it is not already.
Send a 'd' command to bring the service down, if it is not already. The service is unpaused.
Send a 'o' command to bring the service up, in one-shot mode.
Send a 'O' command to turn on one-shot mode if the service is running.
Send a 'p' command to send a SIGSTOP signal to the service.
Send a 'c' command to send a SIGCONT signal to the service.
Send a 'h' command to send a SIGHUP signal to the service.
Send a 'H' command to send a SIGHUP signal to only the main process of the service.
Send a 'a' command to send a SIGALRM signal to the service.
Send a 'i' command to send a SIGINT signal to the service.
Send a 't' command to send a SIGTERM signal to the service.
Send a 'T' command to send a SIGTERM signal to only the main process of the service.
Send a 'k' command to send a SIGKILL signal to the service.
Send a 'K' command to send a SIGKILL signal to only the main process of the service.
Send a 'q' command to send a SIGQUIT signal to the service. (This command will not be recognized by daemontools' supervise(1) or by s6's s6-supervise(1).)
Send a '1' command to send a SIGUSR1 signal to the service. (This command will not be recognized by daemontools' supervise(1).)
Send a '2' command to send a SIGUSR2 signal to the service. (This command will not be recognized by daemontools' supervise(1).)
Send a 'w' command to send a SIGWINCH signal to the service. (This command will not be recognized by daemontools' supervise(1), by runit's runsv(1), or by s6's s6-supervise(1).)
Send a 'z' command to send a SIGTSTP signal to the service. (This command will not be recognized by daemontools' supervise(1), by runit's runsv(1), by s6's s6-supervise(1), or by daemontools-encore's supervise(1).)
For daemontools and daemontools-encore compatibility, this command is also available as svc; and the options are also available in the abbreviated forms [-u], [-d], and so forth.
There is no --exit option. It is meaningless to service-manager(1), since it is not the way that service-manager(1) operates. (Compare runit's runsv(1), whose exit option is curtailed relative to the original daemontools because of differences in the structure of runit. Of course, even daemontools' and daemontools-encore's svc(1) note that using their -x is almost always wrong.)