LinuxCommandLibrary

runsvchdir

Change the runit service directory

TLDR

Change service directory

$ runsvchdir [multi-user]
copy
Switch to rescue mode
$ runsvchdir [single]
copy
View current runlevel
$ cat /etc/runit/runsvdir/current
copy

SYNOPSIS

runsvchdir name

DESCRIPTION

runsvchdir switches which service directory runsvdir supervises. It changes the system's effective runlevel.
Runlevels are directories in /etc/runit/runsvdir/. Each contains symlinks to services.
The switch is graceful. Services not in the new level are stopped, new ones started.
Common levels include default, single, and multi-user. Custom levels can be created.
The current symlink tracks active level. /etc/runit/runsvdir/current points to active.

RUNLEVELS

default - Normal multi-user
single - Single user/rescue
multi-user - Network services
custom - User-defined

CAVEATS

Requires root. Services must exist in target level. Switch may take time for service stops.

HISTORY

runsvchdir is part of runit, providing runlevel-like switching. It allows dynamic reconfiguration of which services are supervised.

SEE ALSO

runsvdir(8), runit(8), sv(8)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community