Debian Codegraph @

upstream/debian-unstable/man1/systemd-socket-activate.1

raw
1 '\" t
2 .TH "SYSTEMD\-SOCKET\-ACTIVATE" "1" "" "systemd 261~rc3" "systemd-socket-activate"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 .ie \n(.g .ds Aq \(aq
11 .el .ds Aq '
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
16 .nh
17 .\" disable justification (adjust text to left margin only)
18 .ad l
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
22 .SH "NAME"
23 systemd-socket-activate \- Test socket activation of daemons
24 .SH "SYNOPSIS"
25 .HP \w'\fBsystemd\-socket\-activate\fR\ 'u
26 \fBsystemd\-socket\-activate\fR [OPTIONS...] \fICOMMAND\fR\ [ARGS...]
27 .SH "DESCRIPTION"
28 .PP
29 \fBsystemd\-socket\-activate\fR
30 may be used to launch a socket\-activated service program from the command line for testing purposes\&. It may also be used to launch individual instances of the service program per connection\&.
31 .PP
32 The daemon to launch and its options should be specified after options intended for
33 \fBsystemd\-socket\-activate\fR\&.
34 .PP
35 If the
36 \fB\-\-inetd\fR
37 option is given, the socket file descriptor will be used as the standard input and output of the launched process\&. Otherwise, standard input and output will be inherited, and sockets will be passed through file descriptors 3 and higher\&. Sockets passed through
38 \fI$LISTEN_FDS\fR
39 to
40 \fBsystemd\-socket\-activate\fR
41 will be passed through to the daemon, in the original positions\&. Other sockets specified with
42 \fB\-\-listen=\fR
43 will use consecutive descriptors\&. By default,
44 \fBsystemd\-socket\-activate\fR
45 listens on a stream socket, use
46 \fB\-\-datagram\fR
47 and
48 \fB\-\-seqpacket\fR
49 to listen on datagram or sequential packet sockets instead (see below)\&.
50 .SH "OPTIONS"
51 .PP
52 \fB\-l \fR\fB\fIaddress\fR\fR, \fB\-\-listen=\fR\fB\fIaddress\fR\fR
53 .RS 4
54 Listen on this
55 \fIaddress\fR\&. Takes a string like
56 "2000"
57 or
58 "127\&.0\&.0\&.1:2001"\&.
59 .sp
60 Added in version 230\&.
61 .RE
62 .PP
63 \fB\-a\fR, \fB\-\-accept\fR
64 .RS 4
65 Launch an instance of the service program for each connection and pass the connection socket\&. May not be combined with
66 \fB\-\-now\fR\&.
67 .sp
68 Added in version 230\&.
69 .RE
70 .PP
71 \fB\-d\fR, \fB\-\-datagram\fR
72 .RS 4
73 Listen on a datagram socket (\fBSOCK_DGRAM\fR), instead of a stream socket (\fBSOCK_STREAM\fR)\&. May not be combined with
74 \fB\-\-seqpacket\fR\&.
75 .sp
76 Added in version 230\&.
77 .RE
78 .PP
79 \fB\-\-seqpacket\fR
80 .RS 4
81 Listen on a sequential packet socket (\fBSOCK_SEQPACKET\fR), instead of a stream socket (\fBSOCK_STREAM\fR)\&. May not be combined with
82 \fB\-\-datagram\fR\&.
83 .sp
84 Added in version 230\&.
85 .RE
86 .PP
87 \fB\-\-inetd\fR
88 .RS 4
89 Use the inetd protocol for passing file descriptors, i\&.e\&. as standard input and standard output, instead of the new\-style protocol for passing file descriptors using
90 \fI$LISTEN_FDS\fR
91 (see above)\&.
92 .sp
93 Added in version 230\&.
94 .RE
95 .PP
96 \fB\-E \fR\fB\fIVAR\fR\fR\fB[=\fIVALUE\fR]\fR, \fB\-\-setenv=\fR\fB\fIVAR\fR\fR\fB[=\fIVALUE\fR]\fR
97 .RS 4
98 Add this variable to the environment of the launched process\&. If
99 \fIVAR\fR
100 is followed by
101 "=", assume that it is a variable\(envalue pair\&. Otherwise, obtain the value from the environment of
102 \fBsystemd\-socket\-activate\fR
103 itself\&.
104 .sp
105 Added in version 230\&.
106 .RE
107 .PP
108 \fB\-\-fdname=\fR\fB\fINAME\fR\fR\fB[:\fINAME\fR\&...]\fR
109 .RS 4
110 Specify names for the file descriptors passed\&. This is equivalent to setting
111 \fIFileDescriptorName=\fR
112 in socket unit files, and enables use of
113 \fBsd_listen_fds_with_names\fR(3)\&. Multiple entries may be specifies using separate options or by separating names with colons (":") in one option\&. In case more names are given than descriptors, superfluous ones will be ignored\&. In case less names are given than descriptors, the remaining file descriptors will be unnamed\&.
114 .sp
115 Added in version 230\&.
116 .RE
117 .PP
118 \fB\-\-now\fR
119 .RS 4
120 Start the service program instantly, instead of waiting for a connection on the socket(s)\&. May not be combined with
121 \fB\-\-accept\fR\&.
122 .sp
123 Added in version 258\&.
124 .RE
125 .PP
126 \fB\-h\fR, \fB\-\-help\fR
127 .RS 4
128 Print a short help text and exit\&.
129 .RE
130 .PP
131 \fB\-\-version\fR
132 .RS 4
133 Print a short version string and exit\&.
134 .RE
135 .SH "ENVIRONMENT VARIABLES"
136 .PP
137 \fI$LISTEN_FDS\fR, \fI$LISTEN_PID\fR, \fI$LISTEN_PIDFDID\fR, \fI$LISTEN_FDNAMES\fR
138 .RS 4
139 See
140 \fBsd_listen_fds\fR(3)\&.
141 .sp
142 Added in version 230\&.
143 .RE
144 .PP
145 \fI$SYSTEMD_LOG_TARGET\fR, \fI$SYSTEMD_LOG_LEVEL\fR, \fI$SYSTEMD_LOG_TIME\fR, \fI$SYSTEMD_LOG_COLOR\fR, \fI$SYSTEMD_LOG_LOCATION\fR
146 .RS 4
147 Same as in
148 \fBsystemd\fR(1)\&.
149 .sp
150 Added in version 230\&.
151 .RE
152 .SH "EXAMPLES"
153 .PP
154 \fBExample\ \&1.\ \&Run an echo server on port 2000\fR
155 .sp
156 .if n \{\
157 .RS 4
158 .\}
159 .nf
160 $ systemd\-socket\-activate \-l 2000 \-\-inetd \-a cat
161 .fi
162 .if n \{\
163 .RE
164 .\}
165 .PP
166 \fBExample\ \&2.\ \&Run a socket\-activated instance of systemd-journal-gatewayd(8)\fR
167 .sp
168 .if n \{\
169 .RS 4
170 .\}
171 .nf
172 $ systemd\-socket\-activate \-l 19531 /usr/lib/systemd/systemd\-journal\-gatewayd
173 .fi
174 .if n \{\
175 .RE
176 .\}
177 .SH "SEE ALSO"
178 .PP
179 \fBsystemd\fR(1), \fBsystemd.socket\fR(5), \fBsystemd.service\fR(5), \fBsystemd-run\fR(1), \fBsd_listen_fds\fR(3), \fBsd_listen_fds_with_names\fR(3), \fBcat\fR(1)