mirror of
https://git.proxmox.com/git/systemd
synced 2025-05-29 13:52:54 +00:00
54 lines
7.7 KiB
HTML
54 lines
7.7 KiB
HTML
<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>
|
||
a.headerlink {
|
||
color: #c60f0f;
|
||
font-size: 0.8em;
|
||
padding: 0 4px 0 4px;
|
||
text-decoration: none;
|
||
visibility: hidden;
|
||
}
|
||
|
||
a.headerlink:hover {
|
||
background-color: #c60f0f;
|
||
color: white;
|
||
}
|
||
|
||
h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
|
||
visibility: visible;
|
||
}
|
||
</style><a href="index.html">Index </a>·
|
||
<a href="systemd.directives.html">Directives </a>·
|
||
<a href="../python-systemd/index.html">Python </a>·
|
||
<a href="../libudev/index.html">libudev </a>·
|
||
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</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="idm139814641219232"></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
|
||
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).
|
||
</p><p>The daemon to launch and its options should be specifed
|
||
after options intended for <span class="command"><strong>systemd-activate</strong></span>.
|
||
</p><p>If the <code class="option">-a</code> 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 <code class="varname">$LISTEN_FDS</code>
|
||
to <span class="command"><strong>systemd-activate</strong></span> will be passed through to
|
||
the dameon, in the original positions. Other sockets specified
|
||
with <code class="option">--listen</code> will use consecutive descriptors.
|
||
</p></div><div class="refsect1"><a name="idm139814641213296"></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>.
|
||
Takes a string like "<code class="literal">2000</code>" or
|
||
"<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
|
||
connection and pass the connection socket as standard input
|
||
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
|
||
launched process. If <em class="replaceable"><code>VAR</code></em> is
|
||
followed by "<code class="literal">=</code>", assume that it is a
|
||
variable–value pair. Otherwise, obtain the value from the
|
||
environment of <span class="command"><strong>systemd-activate</strong></span> itself.
|
||
</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.
|
||
</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="idm139814645095472"></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
|
||
<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
|
||
<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="idm139814645087200"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><div class="example"><a name="idm139814645079168"></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="idm139814645077696"></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="idm139814645075408"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
|
||
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
|
||
<a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
|
||
<a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
|
||
<a href="cat.html"><span class="citerefentry"><span class="refentrytitle">cat</span>(1)</span></a>
|
||
</p></div></div></body></html>
|