systemd/man/systemd-activate.8
2015-02-17 11:22:16 +01:00

123 lines
3.5 KiB
Groff

'\" t
.TH "SYSTEMD\-ACTIVATE" "8" "" "systemd 219" "systemd-activate"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
systemd-activate \- Test socket activation of daemons
.SH "SYNOPSIS"
.HP \w'\fB/usr/lib/systemd/systemd\-activate\fR\ 'u
\fB/usr/lib/systemd/systemd\-activate\fR [OPTIONS...] \fIdaemon\fR [OPTIONS...]
.SH "DESCRIPTION"
.PP
\fBsystemd\-activate\fR
can be used to launch a socket activated daemon from the command line for testing purposes\&. It can also be used to launch single instances of the daemon per connection (inetd\-style)\&.
.PP
The daemon to launch and its options should be specifed after options intended for
\fBsystemd\-activate\fR\&.
.PP
If the
\fB\-a\fR
option is given, file descriptor of the connection 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
\fI$LISTEN_FDS\fR
to
\fBsystemd\-activate\fR
will be passed through to the dameon, in the original positions\&. Other sockets specified with
\fB\-\-listen\fR
will use consecutive descriptors\&.
.SH "OPTIONS"
.PP
\fB\-l \fR\fB\fIaddress\fR\fR, \fB\-\-listen=\fR\fB\fIaddress\fR\fR
.RS 4
Listen on this
\fIaddress\fR\&. Takes a string like
"2000"
or
"127\&.0\&.0\&.1:2001"\&.
.RE
.PP
\fB\-a\fR, \fB\-\-accept\fR
.RS 4
Launch a separate instance of daemon per connection and pass the connection socket as standard input and standard output\&.
.RE
.PP
\fB\-E \fR\fB\fIVAR\fR\fR\fB[=\fIVALUE\fR]\fR, \fB\-\-setenv=\fR\fB\fIVAR\fR\fR\fB[=\fIVALUE\fR]\fR
.RS 4
Add this variable to the environment of the launched process\&. If
\fIVAR\fR
is followed by
"=", assume that it is a variable\(envalue pair\&. Otherwise, obtain the value from the environment of
\fBsystemd\-activate\fR
itself\&.
.RE
.PP
\fB\-h\fR, \fB\-\-help\fR
.RS 4
Print a short help text and exit\&.
.RE
.PP
\fB\-\-version\fR
.RS 4
Print a short version string and exit\&.
.RE
.SH "ENVIRONMENT VARIABLES"
.PP
\fI$LISTEN_FDS\fR, \fI$LISTEN_PID\fR
.RS 4
See
\fBsd_listen_fds\fR(3)\&.
.RE
.PP
\fI$SYSTEMD_LOG_TARGET\fR, \fI$SYSTEMD_LOG_LEVEL\fR, \fI$SYSTEMD_LOG_COLOR\fR, \fI$SYSTEMD_LOG_LOCATION\fR
.RS 4
Same as in
\fBsystemd\fR(1)\&.
.RE
.SH "EXAMPLES"
.PP
\fBExample\ \&1.\ \&Run an echo server on port 2000\fR
.sp
.if n \{\
.RS 4
.\}
.nf
$ /usr/lib/systemd/systemd\-activate \-l 2000 \-a cat
.fi
.if n \{\
.RE
.\}
.PP
\fBExample\ \&2.\ \&Run a socket activated instance of systemd-journal-gatewayd(8)\fR
.sp
.if n \{\
.RS 4
.\}
.nf
$ /usr/lib/systemd/systemd\-activate \-l 19531 /usr/lib/systemd/systemd\-journal\-gatewayd
.fi
.if n \{\
.RE
.\}
.SH "SEE ALSO"
.PP
\fBsystemd\fR(1),
\fBsystemd.socket\fR(5),
\fBsystemd.service\fR(5),
\fBcat\fR(1)