Name

service-control, svc — control services through their supervision directory API

Synopsis

service-control [commands...] {directories...}

svc [commands...] {directories...}

Description

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.

COMMANDS

[--up]

Send a 'u' command to bring the service up, if it is not already.

[--down]

Send a 'd' command to bring the service down, if it is not already. The service is unpaused.

[--once]

Send a 'o' command to bring the service up, in one-shot mode.

[--at-most-once]

Send a 'O' command to turn on one-shot mode if the service is running.

[--pause]

Send a 'p' command to send a SIGSTOP signal to the service.

[--continue]

Send a 'c' command to send a SIGCONT signal to the service.

[--hangup]

Send a 'h' command to send a SIGHUP signal to the service.

[--hangup-main]

Send a 'H' command to send a SIGHUP signal to only the main process of the service.

[--alarm]

Send a 'a' command to send a SIGALRM signal to the service.

[--interrupt]

Send a 'i' command to send a SIGINT signal to the service.

[--terminate]

Send a 't' command to send a SIGTERM signal to the service.

[--terminate-main]

Send a 'T' command to send a SIGTERM signal to only the main process of the service.

[--kill]

Send a 'k' command to send a SIGKILL signal to the service.

[--kill-main]

Send a 'K' command to send a SIGKILL signal to only the main process of the service.

[--quit]

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).)

[--usr1]

Send a '1' command to send a SIGUSR1 signal to the service. (This command will not be recognized by daemontools' supervise(1).)

[--usr2]

Send a '2' command to send a SIGUSR2 signal to the service. (This command will not be recognized by daemontools' supervise(1).)

[--window]

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).)

[--suspend]

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).)

COMPATIBILITY

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.)

Author

Jonathan de Boyne Pollard