]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - man/systemd-run.xml
test-execute: Add tests for new PassEnvironment= directive
[thirdparty/systemd.git] / man / systemd-run.xml
index 71b365c8eb21482ce01c3c0076e7490a4ffb5b3e..414e1c8335f54b8c8f50d3381cccdbe24b9ac052 100644 (file)
     <title>Description</title>
 
     <para><command>systemd-run</command> may be used to create and
-    start a transient <filename>.service</filename> or a transient
-    <filename>.timer</filename> or a <filename>.scope</filename> unit
-    and run the specified <replaceable>COMMAND</replaceable> in
-    it.</para>
+    start a transient <filename>.service</filename> or
+    <filename>.scope</filename> unit and run the specified
+    <replaceable>COMMAND</replaceable> in it. It may also be used to
+    create and start transient <filename>.timer</filename>
+    units.</para>
 
     <para>If a command is run as transient service unit, it will be
     started and managed by the service manager like any other service,
-    and thus show up in the output of <command>systemctl
+    and thus shows up in the output of <command>systemctl
     list-units</command> like any other unit. It will run in a clean
-    and detached execution environment. <command>systemd-run</command>
-    will start the service asynchronously in the background and
-    immediately return.</para>
-
-    <para>If a command is run with timer options, transient timer unit
-    also be created with transient service unit. But the transient
-    timer unit is only started immediately. The transient service unit
-    will be started when the transient timer is elapsed. If
-    <option>--unit=</option> is specified with timer options, the
-    <replaceable>COMMAND</replaceable> can be omitted. In this case,
-    <command>systemd-run</command> assumes service unit is already
-    loaded and creates transient timer unit only. To successfully
-    create timer unit, already loaded service unit should be specified
-    with <option>--unit=</option>. This transient timer unit can
-    activate the existing service unit like any other timer.</para>
+    and detached execution environment, with the service manager as
+    its parent process. In this mode, <command>systemd-run</command>
+    will start the service asynchronously in the background and return
+    after the command has begun execution.</para>
 
     <para>If a command is run as transient scope unit, it will be
-    started directly by <command>systemd-run</command> and thus
-    inherit the execution environment of the caller. It is however
-    managed by the service manager similar to normal services, and
-    will also show up in the output of <command>systemctl
-    list-units</command>. Execution in this case is synchronous, and
-    execution will return only when the command finishes.</para>
+    started by <command>systemd-run</command> itself as parent process
+    and will thus inherit the execution environment of the
+    caller. However, the processes of the command are managed by the
+    service manager similar to normal services, and will show up in
+    the output of <command>systemctl list-units</command>. Execution
+    in this case is synchronous, and will return only when the command
+    finishes. This mode is enabled via the <option>--scope</option>
+    switch (see below). </para>
+
+    <para>If a command is run with timer options such as
+    <option>--on-calendar=</option> (see below), a transient timer
+    unit is created alongside the service unit for the specified
+    command. Only the transient timer unit is started immediately, the
+    transient service unit will be started when the transient timer
+    elapses. If the <option>--unit=</option> is specified, the
+    <replaceable>COMMAND</replaceable> may be omitted. In this case,
+    <command>systemd-run</command> only creates a
+    <filename>.timer</filename> unit that invokes the specified unit
+    when elapsing.</para>
   </refsect1>
 
   <refsect1>
     <para>The following options are understood:</para>
 
     <variablelist>
+      <varlistentry>
+        <term><option>--no-ask-password</option></term>
+
+        <listitem><para>Do not query the user for authentication for
+        privileged operations.</para></listitem>
+      </varlistentry>
+
       <varlistentry>
         <term><option>--scope</option></term>
 
         <term><option>--pty</option></term>
         <term><option>-t</option></term>
 
-        <listitem><para>When invoking a command as service connects
+        <listitem><para>When invoking a command, the service connects
         its standard input and output to the invoking tty via a
         pseudo TTY device. This allows invoking binaries as services
         that expect interactive user input, such as interactive
@@ -345,7 +355,7 @@ Sep 08 07:37:21 bupkis env[19948]: BOOT_IMAGE=/vmlinuz-3.11.0-0.rc5.git6.2.fc20.
 
     <para>The following command invokes the
     <citerefentry project='man-pages'><refentrytitle>updatedb</refentrytitle><manvolnum>8</manvolnum></citerefentry>
-    tool, but lowers the block IO weight for it to 10. See
+    tool, but lowers the block I/O weight for it to 10. See
     <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>
     for more information on the <varname>BlockIOWeight=</varname>
     property.</para>
@@ -371,7 +381,7 @@ Dec 08 20:44:48 container systemd[1]: Started /bin/touch /tmp/foo.</programlisti
     as a service passing its standard input, output and error to
     the calling TTY.</para>
 
-    <programlisting># systemd-run -t /bin/bash</programlisting>
+    <programlisting># systemd-run -t --send-sighup /bin/bash</programlisting>
 
   </refsect1>