.TH update-service 8 .SH NAME update-service \- add/remove a service to/from system-wide service supervision .SH SYNOPSIS .B update-service \--add|--remove .I service-directory [\fIservice-name\fB] .P .B update-service \--list|--check [\fIservice-name\fB] .P .B update-service \--auto|--noauto .I service-directory .SH DESCRIPTION .I service-directory must be a directory to be used by .BR runsv (8), .I service-name must not start with a dot, and must not contain a slash. .P .B update-service adds or removes the .I service-directory to the system-wide service supervision provided through runit 's .BR runsvdir (8), lists all registered system-wide services, or checks for a specific .I service-name whether it is registered. .P When adding a service, and the .I service-directory resides in /etc/, .B update-service makes sure that the ./supervise/ subdirectories in the .IR service-directory , and the optional .IR service-directory /log/, are symbolic links pointing into /var/lib/supervise/, unless they already are symbolic links. .SH OPTIONS .TP .B \--add | \-a Add the service directory .I service-directory to the system-wide service supervision, under the name .IR service-name . If .I service-name is not specified, .B update-service will use the basename of .IR service-directory . You can use the .BR sv (8) program to control the newly added service, or query its status, e.g.: # sv status .I service-name .TP .B \--remove | \-r Remove the service directory .IR service-directory , which has been added under the name .IR service-name , from the system-wide service supervision. If .I service-name is not specified, .B update-service will use the basename of .IR service-directory . When removing the .IR service-directory , the .I exit command is sent to the corresponding .BR runsv (8) process, telling it to take the service down and exit afterwards. You can use the .BR sv (8) program to control the removed service, or query its status, e.g.: # sv status .I service-directory .TP .B \--list | \-l If .I service-name is specified, .B update-service checks whether .I service-name is registered as system-wide service, prints a message and exits non-zero if not, or prints the .I service-name and the directory it points to and exits zero if yes. If .I service-name is not specified, it prints the names of all system-widely registered services, one per line. .TP .B \--check | \-c The same as --list, but .B update-service doesn't print anything to standard out or standard error. .TP .B \--auto | \-u Remove the down file, if any, from the directory .IR service-directory . This way, the service represented by the .IR service-directory will be started and monitored as soon as a runsv process is started for that directory; the requested status of the service will be 'up'. This is the default. If .I service-name is given, will be ignored as .BR --auto directly act on the .IR service-directory and thus only takes .IR service-directory as argument. .TP .B \--noauto | \-n Touch a down file into the .IR service-directory . This way the service represented by .IR service-directory will not be automatically started when a runsv process is started for that directory. The requested status of the service will be 'down'. A service set to .BR --noauto does not start automatically at boot or when a .BR runsvchdir (8) takes place, but can still be started using the .BR sv (8) program, e.g.: # sv up .I service-name If .I service-name is given, will be ignored as .BR --noauto directly act on the .IR service-directory and thus only takes .IR service-directory as argument. .SH ENVIRONMENT .TP .B SVDIR The environment variable $SVDIR overrides the default services directory .IR /etc/service/ . .SH FILES /etc/service/ .SH SEE ALSO sv(8), runsv(8), runsvdir(8) .P http://smarden.org/runit/ .SH AUTHOR Gerrit Pape