.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] .SH DESCRIPTION .I service-directory must be a directory to be used by .BR supervise (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 daemontools' .BR svscan (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 svc (8) program to control the newly added service, and the .BR svstat (8) program to query its status, e.g.: # svstat /etc/service/\fIservice-name\fR .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 supervise (8) process, telling it to take the service down and exit afterwards. You can use the .BR svc (8) and .BR svstat (8) programs to control the removed service, or query its status, e.g.: # svstat .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. .SH ENVIRONMENT .TP .B SVDIR The environment variable $SVDIR overrides the default services directory .IR /etc/service/ . .SH FILES /etc/service/ .SH SEE ALSO svc(8), svstat(8), svscan(8), svscanboot(8) .SH AUTHOR Gerrit Pape