systemd.unit.xml revision 74051b9b5865586bf4d30b9075649af838fb92bd
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder This file is part of systemd.
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder Copyright 2010 Lennart Poettering
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder systemd is free software; you can redistribute it and/or modify it
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder under the terms of the GNU Lesser General Public License as published by
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder the Free Software Foundation; either version 2.1 of the License, or
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder (at your option) any later version.
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder systemd is distributed in the hope that it will be useful, but
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder WITHOUT ANY WARRANTY; without even the implied warranty of
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder Lesser General Public License for more details.
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder You should have received a copy of the GNU Lesser General Public License
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder along with systemd; If not, see <http://www.gnu.org/licenses/>.
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <email>lennart@poettering.net</email>
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder </refentryinfo>
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <refentrytitle>systemd.unit</refentrytitle>
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <refpurpose>Unit configuration</refpurpose>
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <refsynopsisdiv>
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <para><filename>systemd.service</filename>,
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <filename>systemd.automount</filename>,
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <filename>systemd.snapshot</filename></para>
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder </refsynopsisdiv>
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <para>A unit configuration file encodes information
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder about a service, a socket, a device, a mount point, an
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder automount point, a swap file or partition, a start-up
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder target, a file system path or a timer controlled and
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>. The
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder syntax is inspired by <ulink
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder url="http://standards.freedesktop.org/desktop-entry-spec/latest/">XDG
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder Desktop Entry Specification</ulink> <filename>.desktop</filename> files, which are in turn
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder inspired by Microsoft Windows
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <filename>.ini</filename> files.</para>
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <para>This man page lists the common configuration
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder options of all the unit types. These options need to
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder be configured in the [Unit] or [Install]
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder sections of the unit files.</para>
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <para>In addition to the generic [Unit] and [Install]
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder sections described here, each unit may have a
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder type-specific section, e.g. [Service] for a service
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder unit. See the respective man pages for more
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder information.</para>
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder <para>Unit files may contain additional options on top
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder of those listed here. If systemd encounters an unknown
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder option it will write a warning log message but
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder continue loading the unit. If an option is prefixed
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder with <option>X-</option> it is ignored completely by
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder systemd. Applications may use this to include
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder additional information in the unit files.</para>
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <para>Boolean arguments used in unit files can be
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder written in various formats. For positive settings the
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder strings <option>1</option>, <option>yes</option>,
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <option>true</option> and <option>on</option> are
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder equivalent. For negative settings the strings
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <option>0</option>, <option>no</option>,
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder <option>false</option> and <option>off</option> are
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder equivalent.</para>
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <para>Time span values encoded in unit files can be
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder written in various formats. A stand-alone number
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder specifies a time in seconds. If suffixed with a time
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder unit, the unit is honored. A concatenation of multiple
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder values with units is supported, in which case the
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder values are added up. Example: "50" refers to 50
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder seconds; "2min 200ms" refers to 2 minutes plus 200
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder milliseconds, i.e. 120200ms. The following time units
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder are understood: s, min, h, d, w, ms, us. For details
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder <citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder <para>Empty lines and lines starting with # or ; are
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder ignored. This may be used for commenting. Lines ending
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder in a backslash are concatenated with the following
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder line while reading and the backslash is replaced by a
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder space character. This may be used to wrap long lines.</para>
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder <para>Along with a unit file
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder <filename>foo.service</filename> the directory
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder <filename>foo.service.wants/</filename> may exist. All
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder unit files symlinked from such a directory are
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder implicitly added as dependencies of type
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <varname>Wanted=</varname> to the unit. This is useful
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder to hook units into the start-up of other units,
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder without having to modify their unit files. For details
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder about the semantics of <varname>Wanted=</varname> see
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder below. The preferred way to create symlinks in the
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder <filename>.wants/</filename> directory of a unit file
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder is with the <command>enable</command> command of the
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder tool which reads information from the [Install]
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder section of unit files (see below). A similar
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder functionality exists for <varname>Requires=</varname>
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder type dependencies as well, the directory suffix is
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <filename>.requires/</filename> in this case.</para>
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder <para>Along with a unit file
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <filename>foo.service</filename> a directory
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <filename>foo.service.d/</filename> may exist. All
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder files with the suffix <filename>.conf</filename> from
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder this directory will be parsed after the file itself is
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder parsed. This is useful to alter or add configuration
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder settings to a unit, without having to modify their
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder unit files. Make sure that the file that is included
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder has the appropriate section headers before any
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder directive.</para>
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder <para>If a line starts with <option>.include</option>
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder followed by a file name, the specified file will be
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder parsed at this point. Make sure that the file that is
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder included has the appropriate section headers before
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder any directives.</para>
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder <para>Note that while systemd offers a flexible
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder dependency system between units it is recommended to
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder use this functionality only sparsely and instead rely
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder on techniques such as bus-based or socket-based
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder activation which makes dependencies implicit, which
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder both results in a simpler and more flexible
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder system.</para>
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <para>Some unit names reflect paths existing in the
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder file system name space. Example: a device unit
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <filename>dev-sda.device</filename> refers to a device
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder with the device node <filename>/dev/sda</filename> in
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder the file system namespace. If this applies a special
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder way to escape the path name is used, so that the
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder result is usable as part of a file name. Basically,
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder given a path, "/" is replaced by "-", and all
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder unprintable characters and the "-" are replaced by
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder C-style "\x20" escapes. The root directory "/" is
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder encoded as single dash, while otherwise the initial
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder and ending "/" is removed from all paths during
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder transformation. This escaping is reversible.</para>
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <para>Optionally, units may be instantiated from a
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder template file at runtime. This allows creation of
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder multiple units from a single configuration file. If
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder systemd looks for a unit configuration file it will
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder first search for the literal unit name in the
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder filesystem. If that yields no success and the unit
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder name contains an @ character, systemd will look for a
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder unit template that shares the same name but with the
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder instance string (i.e. the part between the @ character
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder and the suffix) removed. Example: if a service
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder <filename>getty@tty3.service</filename> is requested
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder and no file by that name is found, systemd will look
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder for <filename>getty@.service</filename> and
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder instantiate a service from that configuration file if
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder it is found.</para>
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder <para>To refer to the instance string from
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder within the configuration file you may use the special
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <literal>%i</literal> specifier in many of the
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder configuration options. See below for details.</para>
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder <para>If a unit file is empty (i.e. has the file size
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder 0) or is symlinked to <filename>/dev/null</filename>
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder its configuration will not be loaded and it appears
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder with a load state of <literal>masked</literal>, and
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder cannot be activated. Use this as an effective way to
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder fully disable a unit, making it impossible to start it
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder even manually.</para>
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder <para>The unit file format is covered by the
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder url="http://www.freedesktop.org/wiki/Software/systemd/InterfaceStabilityPromise">Interface
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder <para>Unit file may include a [Unit] section, which
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder carries generic information about the unit that is not
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder dependent on the type of unit:</para>
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder <variablelist>
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <term><varname>Description=</varname></term>
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder describing the unit. This is intended
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder for use in UIs to show descriptive
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder information along with the unit
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder </varlistentry>
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <term><varname>Documentation=</varname></term>
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <listitem><para>A space separated list
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder of URIs referencing documentation for
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder this unit or its
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder configuration. Accepted are only URIs
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder information about the syntax of these
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <citerefentry><refentrytitle>uri</refentrytitle><manvolnum>7</manvolnum></citerefentry>. The
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder URIs should be listed in order of
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder relevance, starting with the most
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder relevant. It is a good idea to first
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder reference documentation that explains
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder what the unit's purpose is, followed
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder by how it is configured, followed by
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder any other related documentation. This
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder option may be specified more than once
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder in which case the specified list of
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder URIs is merged. If the empty string is
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder assigned to this option the list is
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder reset and all prior assignments will
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder </varlistentry>
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <term><varname>Requires=</varname></term>
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <listitem><para>Configures requirement
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder dependencies on other units. If this
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder unit gets activated, the units listed
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder here will be activated as well. If one
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder of the other units gets deactivated or
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder its activation fails, this unit will
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder be deactivated. This option may be
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder specified more than once, in which
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder case requirement dependencies for all
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder listed names are created. Note that
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder requirement dependencies do not
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder influence the order in which services
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder are started or stopped. This has to be
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder configured independently with the
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <varname>Before=</varname> options. If
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder requires a unit
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder configured with
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder ordering is configured with
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <varname>Before=</varname>, then both
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder units will be started simultaneously
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder and without any delay between them if
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder activated. Often it is a better choice
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <varname>Requires=</varname> in order
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder to achieve a system that is more
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder robust when dealing with failing
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder services.</para>
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder <para>Note that dependencies of this
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder type may also be configured outside of
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder the unit configuration file by
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder adding a symlink to a
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <filename>.requires/</filename> directory
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder accompanying the unit file. For
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder </varlistentry>
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder <varlistentry>
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <term><varname>RequiresOverridable=</varname></term>
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder Dependencies listed in
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <varname>RequiresOverridable=</varname>
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder which cannot be fulfilled or fail to
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder start are ignored if the startup was
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder explicitly requested by the user. If
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder the start-up was pulled in indirectly
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder by some dependency or automatic
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder start-up of units that is not
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder requested by the user this dependency
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder must be fulfilled and otherwise the
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder transaction fails. Hence, this option
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder may be used to configure dependencies
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder that are normally honored unless the
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder user explicitly starts up the unit, in
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder which case whether they failed or not
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder </varlistentry>
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <term><varname>Requisite=</varname></term>
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <term><varname>RequisiteOverridable=</varname></term>
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder and <varname>RequiresOverridable=</varname>, respectively. However,
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder if a unit listed here is not started
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder already it will not be started and the
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder transaction fails
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder </varlistentry>
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <term><varname>Wants=</varname></term>
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder listed in this option will be started
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder if the configuring unit is. However,
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder if the listed unit fails to start up
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder or cannot be added to the transaction
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder this has no impact on the validity of
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder the transaction as a whole. This is
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder the recommended way to hook start-up
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder of one unit to the start-up of another
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <para>Note that dependencies of this
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder type may also be configured outside of
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder the unit configuration file by
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder adding a symlink to a
81f49ee02aaa3bc870401f8883bf52742eb3ea7aJonathan von Schroeder <filename>.wants/</filename> directory
db9680b2bbd9d091b198eaa4e324762921965fb3Christian Maeder accompanying the unit file. For
opposite, i.e. that the configured
applied. i.e. if a unit is configured
enqueued in isolation mode, i.e. all
(i.e. not mounted
assignment (i.e. two words, separated
(i.e. this does not check whether
all of them apply (i.e. a logical AND
suffix (i.e. type) as the unit file
<entry>For instantiated units this refers to the string before the @. For non-instantiated units this refers to to the name of the unit with the type suffix removed.</entry>
<entry>This is either the unescaped instance name (if applicable) with / prepended (if applicable), or the prefix name similarly prepended with /.</entry>
<entry>This is either <filename>/run</filename> (for the system manager) or <literal>$XDG_RUNTIME_DIR</literal> (for user managers).</entry>
<entry>This is the name of the configured user of the unit, or (if none is set) the user running the systemd instance.</entry>
<entry>This is the UID of the configured user of the unit, or (if none is set) the user running the systemd instance.</entry>
<entry>This is the home directory of the configured user of the unit, or (if none is set) the user running the systemd instance.</entry>
<entry>This is the shell of the configured user of the unit, or (if none is set) the user running the systemd instance.</entry>
<entry>The machine ID of the running system, formatted as string. See <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry> for more information.</entry>
<entry>The boot ID of the running system, formatted as string. See <citerefentry><refentrytitle>random</refentrytitle><manvolnum>4</manvolnum></citerefentry> for more information.</entry>
<citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.snapshot</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>