File: update-service.8

package info (click to toggle)
runit 2.1.1-6.2
  • links: PTS
  • area: main
  • in suites: squeeze, wheezy
  • size: 1,412 kB
  • ctags: 987
  • sloc: ansic: 5,685; sh: 709; makefile: 435
file content (121 lines) | stat: -rw-r--r-- 2,705 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
.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 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.
.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 <pape@smarden.org>