---
name: "runsvctrl"
section: "8"
platform: "linux"
package: "runit"
version: "1.0.5-3"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/runsvctrl"
---

# runsvctrl(8)

controls a service monitored by runsv(8).

## NAME

runsvctrl - controls a service monitored by [**runsv**(8)](/runsv/8.md).

## SYNOPSIS

**runsvctrl** *command* *services*

## DESCRIPTION

*services* consists of one or more arguments, each argument naming a directory used by [**runsv**(8)](/runsv/8.md). *command* is one of up, down, once, pause, cont, hup, alarm, interrupt, 1, 2, term, kill, or exit.

For each *service* of *services*, **runsvctrl** sends the command *command* to the *service*, which must be controlled by [**runsv**(8)](/runsv/8.md).

## COMMANDS

- **up**

  If the service is not running, start it. If the service stops, restart it.

- **down**

  If the service is running, send it a TERM signal. If ./run exits, start ./finish if it exists. After it stops, do not restart service.

- **once**

  If the service is not running, start it. Do not restart it if it stops.

- **pause**

  If the service is running, send it a STOP signal.

- **cont**

  If the service is running, send it a CONT signal.

- **hup**

  If the service is running, send it a HUP signal.

- **alarm**

  If the service is running, send it a ALRM signal.

- **interrupt**

  If the service is running, send it a INT signal.

- **quit**

  If the service is running, send it a QUIT signal.

- **1**

  User-defined 1. If the service is running, send it a USR1 signal.

- **2**

  User-defined 2. If the service is running, send it a USR2 signal.

- **term**

  If the service is running, send it a TERM signal.

- **kill**

  If the service is running, send it a KILL signal.

- **exit**

  If the service is running, send it a TERM signal. Do not restart the service. If the service is down, and no log service exists, [**runsv**(8)](/runsv/8.md) exits. If the service is down and a log service exists, send a TERM signal to the log service. If the log service is down, [**runsv**(8)](/runsv/8.md) exits. This command is ignored if it is given to *service*/log/supervise/control.

**runsvctrl** actually looks only at the first character of *command*.

## EXIT CODES

**runsvctrl** exits 0, if the *command* was sent successfully to all *services*.

For each *service* that caused an error (e.g. the directory is not controlled by a [**runsv**(8)](/runsv/8.md) process), **runsvctrl** increases the exit code by one and exits non zero. The maximum is 100.

**runsvctrl** exits 111 on error.

## SEE ALSO

[runsv(8)](/runsv/8.md), [runsvstat(8)](/runsvstat/8.md), [chpst(8)](/chpst/8.md), [svlogd(8)](/svlogd/8.md), [runit(8)](/runit/8.md), [runit-init(8)](/runit-init/8.md), [runsvdir(8)](/runsvdir/8.md), [runsvchdir(8)](/runsvchdir/8.md), [utmpset(8)](/utmpset/8.md), [svwaitdown(8)](/svwaitdown/8.md), [svwaitup(8)](/svwaitup/8.md)

 http://smarden.org/runit/

## AUTHOR

Gerrit Pape \<pape@smarden.org\>
