]> git.proxmox.com Git - systemd.git/blob - man/systemd-activate.html
dd90b58566019159ee688f2c433ddba7655ef247
[systemd.git] / man / systemd-activate.html
1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>systemd-activate</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
2 a.headerlink {
3 color: #c60f0f;
4 font-size: 0.8em;
5 padding: 0 4px 0 4px;
6 text-decoration: none;
7 visibility: hidden;
8 }
9
10 a.headerlink:hover {
11 background-color: #c60f0f;
12 color: white;
13 }
14
15 h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
16 visibility: visible;
17 }
18 </style><a href="index.html">Index </a>·
19 <a href="systemd.directives.html">Directives </a>·
20 <a href="../python-systemd/index.html">Python </a>·
21 <a href="../libudev/index.html">libudev </a>·
22 <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 220</span><hr><div class="refentry"><a name="systemd-activate"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-activate — Test socket activation of daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">/usr/lib/systemd/systemd-activate</code> [OPTIONS...] <em class="replaceable"><code>daemon</code></em> [OPTIONS...]</p></div></div><div class="refsect1"><a name="idm140084367084288"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><span class="command"><strong>systemd-activate</strong></span> can be used to
23 launch a socket activated daemon from the command line for
24 testing purposes. It can also be used to launch single instances
25 of the daemon per connection (inetd-style).
26 </p><p>The daemon to launch and its options should be specified
27 after options intended for <span class="command"><strong>systemd-activate</strong></span>.
28 </p><p>If the <code class="option">-a</code> option is given, file descriptor
29 of the connection will be used as the standard input and output of
30 the launched process. Otherwise, standard input and output will be
31 inherited, and sockets will be passed through file descriptors 3
32 and higher. Sockets passed through <code class="varname">$LISTEN_FDS</code>
33 to <span class="command"><strong>systemd-activate</strong></span> will be passed through to
34 the daemon, in the original positions. Other sockets specified
35 with <code class="option">--listen</code> will use consecutive descriptors.
36 </p></div><div class="refsect1"><a name="idm140084362181152"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options"></a></h2><div class="variablelist"><dl class="variablelist"><dt id="-l address"><span class="term"><code class="option">-l <em class="replaceable"><code>address</code></em></code>, </span><span class="term"><code class="option">--listen=<em class="replaceable"><code>address</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-l%20address"></a></dt><dd><p>Listen on this <em class="replaceable"><code>address</code></em>.
37 Takes a string like "<code class="literal">2000</code>" or
38 "<code class="literal">127.0.0.1:2001</code>".</p></dd><dt id="-a"><span class="term"><code class="option">-a</code>, </span><span class="term"><code class="option">--accept</code></span><a class="headerlink" title="Permalink to this term" href="#-a"></a></dt><dd><p>Launch a separate instance of daemon per
39 connection and pass the connection socket as standard input
40 and standard output.</p></dd><dt id="-E VAR=VALUE"><span class="term"><code class="option">-E <em class="replaceable"><code>VAR</code></em>[<span class="optional">=<em class="replaceable"><code>VALUE</code></em></span>]</code>, </span><span class="term"><code class="option">--setenv=<em class="replaceable"><code>VAR</code></em>[<span class="optional">=<em class="replaceable"><code>VALUE</code></em></span>]</code></span><a class="headerlink" title="Permalink to this term" href="#-E%20VAR=VALUE"></a></dt><dd><p>Add this variable to the environment of the
41 launched process. If <em class="replaceable"><code>VAR</code></em> is
42 followed by "<code class="literal">=</code>", assume that it is a
43 variable–value pair. Otherwise, obtain the value from the
44 environment of <span class="command"><strong>systemd-activate</strong></span> itself.
45 </p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h"></a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
46 </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version"></a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm140084362166928"></a><h2 id="Environment variables">Environment variables<a class="headerlink" title="Permalink to this headline" href="#Environment%20variables"></a></h2><div class="variablelist"><dl class="variablelist"><dt id="$LISTEN_FDS"><span class="term"><code class="varname">$LISTEN_FDS</code>, </span><span class="term"><code class="varname">$LISTEN_PID</code></span><a class="headerlink" title="Permalink to this term" href="#%24LISTEN_FDS"></a></dt><dd><p>See
47 <a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>.</p></dd><dt id="$SYSTEMD_LOG_TARGET"><span class="term"><code class="varname">$SYSTEMD_LOG_TARGET</code>, </span><span class="term"><code class="varname">$SYSTEMD_LOG_LEVEL</code>, </span><span class="term"><code class="varname">$SYSTEMD_LOG_COLOR</code>, </span><span class="term"><code class="varname">$SYSTEMD_LOG_LOCATION</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_LOG_TARGET"></a></dt><dd><p>Same as in
48 <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>.</p></dd></dl></div></div><div class="refsect1"><a name="idm140084362159136"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples"></a></h2><div class="example"><a name="idm140084362158496"></a><p class="title"><b>Example 1. Run an echo server on port 2000</b></p><div class="example-contents"><pre class="programlisting">$ /usr/lib/systemd/systemd-activate -l 2000 -a cat</pre></div></div><br class="example-break"><div class="example"><a name="idm140084362157104"></a><p class="title"><b>Example 2. Run a socket activated instance of <a href="systemd-journal-gatewayd.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd</span>(8)</span></a></b></p><div class="example-contents"><pre class="programlisting">$ /usr/lib/systemd/systemd-activate -l 19531 /usr/lib/systemd/systemd-journal-gatewayd</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm140084362154848"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
49 <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
50 <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
51 <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
52 <a href="http://man7.org/linux/man-pages/man1/cat.1.html"><span class="citerefentry"><span class="refentrytitle">cat</span>(1)</span></a>
53 </p></div></div></body></html>