systemd-activate.html 7.61 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
<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>·
22
  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</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="idm214176941344"></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 24 25 26 27 28 29 30 31 32 33 34 35
    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.
36
    </p></div><div class="refsect1"><a name="idm214177010960"></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 38
        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
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 43
        followed by "<code class="literal">=</code>", assume that it is a
        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="idm214177071616"></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 49
        <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="idm214177063344"></a><h2 id="Example 1">Example 1<a class="headerlink" title="Permalink to this headline" href="#Example%201"></a></h2><pre class="programlisting">$ /usr/lib/systemd/systemd-activate -l 2000 -a cat</pre><p>This runs an echo server on port 2000.</p></div><div class="refsect1"><a name="idm214177061456"></a><h2 id="Example 2">Example 2<a class="headerlink" title="Permalink to this headline" href="#Example%202"></a></h2><pre class="programlisting">$ /usr/lib/systemd/systemd-activate -l 19531 /usr/lib/systemd/systemd-journal-gatewayd</pre><p>This runs a socket activated instance of
    <a href="systemd-journal-gatewayd.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd</span>(8)</span></a>.</p></div><div class="refsect1"><a name="idm214177058800"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
50 51 52 53 54
      <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>