Debian Codegraph @

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

raw
1 '\" t
2 .TH "SYSTEMD\-SOCKET\-ACTIVATE" "1" "" "systemd 257.13" "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...] \fIdaemon\fR [OPTIONS...]
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\&.
66 .sp
67 Added in version 230\&.
68 .RE
69 .PP
70 \fB\-d\fR, \fB\-\-datagram\fR
71 .RS 4
72 Listen on a datagram socket (\fBSOCK_DGRAM\fR), instead of a stream socket (\fBSOCK_STREAM\fR)\&. May not be combined with
73 \fB\-\-seqpacket\fR\&.
74 .sp
75 Added in version 230\&.
76 .RE
77 .PP
78 \fB\-\-seqpacket\fR
79 .RS 4
80 Listen on a sequential packet socket (\fBSOCK_SEQPACKET\fR), instead of a stream socket (\fBSOCK_STREAM\fR)\&. May not be combined with
81 \fB\-\-datagram\fR\&.
82 .sp
83 Added in version 230\&.
84 .RE
85 .PP
86 \fB\-\-inetd\fR
87 .RS 4
88 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
89 \fI$LISTEN_FDS\fR
90 (see above)\&.
91 .sp
92 Added in version 230\&.
93 .RE
94 .PP
95 \fB\-E \fR\fB\fIVAR\fR\fR\fB[=\fIVALUE\fR]\fR, \fB\-\-setenv=\fR\fB\fIVAR\fR\fR\fB[=\fIVALUE\fR]\fR
96 .RS 4
97 Add this variable to the environment of the launched process\&. If
98 \fIVAR\fR
99 is followed by
100 "=", assume that it is a variable\(envalue pair\&. Otherwise, obtain the value from the environment of
101 \fBsystemd\-socket\-activate\fR
102 itself\&.
103 .sp
104 Added in version 230\&.
105 .RE
106 .PP
107 \fB\-\-fdname=\fR\fB\fINAME\fR\fR\fB[:\fINAME\fR\&...]\fR
108 .RS 4
109 Specify names for the file descriptors passed\&. This is equivalent to setting
110 \fIFileDescriptorName=\fR
111 in socket unit files, and enables use of
112 \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\&.
113 .sp
114 Added in version 230\&.
115 .RE
116 .PP
117 \fB\-h\fR, \fB\-\-help\fR
118 .RS 4
119 Print a short help text and exit\&.
120 .RE
121 .PP
122 \fB\-\-version\fR
123 .RS 4
124 Print a short version string and exit\&.
125 .RE
126 .SH "ENVIRONMENT VARIABLES"
127 .PP
128 \fI$LISTEN_FDS\fR, \fI$LISTEN_PID\fR, \fI$LISTEN_FDNAMES\fR
129 .RS 4
130 See
131 \fBsd_listen_fds\fR(3)\&.
132 .sp
133 Added in version 230\&.
134 .RE
135 .PP
136 \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
137 .RS 4
138 Same as in
139 \fBsystemd\fR(1)\&.
140 .sp
141 Added in version 230\&.
142 .RE
143 .SH "EXAMPLES"
144 .PP
145 \fBExample\ \&1.\ \&Run an echo server on port 2000\fR
146 .sp
147 .if n \{\
148 .RS 4
149 .\}
150 .nf
151 $ systemd\-socket\-activate \-l 2000 \-\-inetd \-a cat
152 .fi
153 .if n \{\
154 .RE
155 .\}
156 .PP
157 \fBExample\ \&2.\ \&Run a socket\-activated instance of systemd-journal-gatewayd(8)\fR
158 .sp
159 .if n \{\
160 .RS 4
161 .\}
162 .nf
163 $ systemd\-socket\-activate \-l 19531 /usr/lib/systemd/systemd\-journal\-gatewayd
164 .fi
165 .if n \{\
166 .RE
167 .\}
168 .SH "SEE ALSO"
169 .PP
170 \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)