svctl
- runit
service and runlevel manager
svctl
[global options] command [command options] [arguments...]
svctl
is a command-line tool that manages runit
services and runlevels. It
is an abstraction on top of symlinks and runsvchdir
. runit
services are
stored in /etc/runit/services
. Each runlevel is represented by a directory in
/etc/runit/runsvdir
and contains links to services in /etc/runit/services
.
svctl
manages these symlinks.
svctl
operates on the current system state. If you're using vpsAdminOS as
a live system, the changes will not be persistent. You need to make the changes
in your Nix configuration if you wish them to be permanent. svctl
is useful
for temporary runlevel changes, such as on-demand runlevel switching and
enabling/disabling of services.
list-services
-a
| [runlevel] -a
, --all
List services from all runlevels.
enable
service [runlevel]current
. This is
an equivalent of
ln -s /etc/runit/services/<service> /etc/runit/runsvdir/<runlevel>/<service>
.disable
service [runlevel]current
. This is
an equivalent of rm -f /etc/runit/runsvdir/<runlevel>/<service>
.protect
service-pattern/run/runit/protected-services.txt
.unprotect
service-patternsvctl protect
and allow service-pattern to be restarted or reloaded
when system configuration is switched.list-protected
list-runlevels
runlevel
/etc/runit/runsvdir/current
points to the
current runlevel.switch
runlevelrunsvchdir <runlevel>
. Services
that are no longer enabled will be stopped and new services will be started.
It may take several seconds for runit
to notice the change.Report bugs to https://github.com/vpsfreecz/vpsadminos/issues.
svctl
is a part of vpsAdminOS.