chiark / gitweb /
load-fragment: a few modernizations
[elogind.git] / man / systemd.service.xml
1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
3 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
4         "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5
6 <!--
7   This file is part of systemd.
8
9   Copyright 2010 Lennart Poettering
10
11   systemd is free software; you can redistribute it and/or modify it
12   under the terms of the GNU Lesser General Public License as published by
13   the Free Software Foundation; either version 2.1 of the License, or
14   (at your option) any later version.
15
16   systemd is distributed in the hope that it will be useful, but
17   WITHOUT ANY WARRANTY; without even the implied warranty of
18   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19   Lesser General Public License for more details.
20
21   You should have received a copy of the GNU Lesser General Public License
22   along with systemd; If not, see <http://www.gnu.org/licenses/>.
23 -->
24
25 <refentry id="systemd.service">
26         <refentryinfo>
27                 <title>systemd.service</title>
28                 <productname>systemd</productname>
29
30                 <authorgroup>
31                         <author>
32                                 <contrib>Developer</contrib>
33                                 <firstname>Lennart</firstname>
34                                 <surname>Poettering</surname>
35                                 <email>lennart@poettering.net</email>
36                         </author>
37                 </authorgroup>
38         </refentryinfo>
39
40         <refmeta>
41                 <refentrytitle>systemd.service</refentrytitle>
42                 <manvolnum>5</manvolnum>
43         </refmeta>
44
45         <refnamediv>
46                 <refname>systemd.service</refname>
47                 <refpurpose>systemd service configuration files</refpurpose>
48         </refnamediv>
49
50         <refsynopsisdiv>
51                 <para><filename>systemd.service</filename></para>
52         </refsynopsisdiv>
53
54         <refsect1>
55                 <title>Description</title>
56
57                 <para>A unit configuration file whose name ends in
58                 <filename>.service</filename> encodes information
59                 about a process controlled and supervised by
60                 systemd.</para>
61
62                 <para>This man page lists the configuration options
63                 specific to this unit type. See
64                 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
65                 for the common options of all unit configuration
66                 files. The common configuration items are configured
67                 in the generic <literal>[Unit]</literal> and
68                 <literal>[Install]</literal> sections. The service
69                 specific configuration options are configured in the
70                 <literal>[Service]</literal> section.</para>
71
72                 <para>Additional options are listed in
73                 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
74                 which define the execution environment the commands
75                 are executed in.</para>
76
77                 <para>Unless <varname>DefaultDependencies=</varname>
78                 is set to <option>false</option>, service units will
79                 implicitly have dependencies of type
80                 <varname>Requires=</varname> and
81                 <varname>After=</varname> on
82                 <filename>basic.target</filename> as well as
83                 dependencies of type <varname>Conflicts=</varname> and
84                 <varname>Before=</varname> on
85                 <filename>shutdown.target</filename>. These ensure
86                 that normal service units pull in basic system
87                 initialization, and are terminated cleanly prior to
88                 system shutdown. Only services involved with early
89                 boot or late system shutdown should disable this
90                 option.</para>
91
92                 <para>If a service is requested under a certain name
93                 but no unit configuration file is found, systemd looks
94                 for a SysV init script by the same name (with the
95                 <filename>.service</filename> suffix removed) and
96                 dynamically creates a service unit from that
97                 script. This is useful for compatibility with
98                 SysV. Note that this compatibility is quite
99                 comprehensive but not 100%. For details about the
100                 incomptibilities see the <ulink
101                 url="http://www.freedesktop.org/wiki/Software/systemd/Incompatibilities">Incompatibilities
102                 with SysV</ulink> document.
103                 </para>
104         </refsect1>
105
106         <refsect1>
107                 <title>Options</title>
108
109                 <para>Service files must include a
110                 <literal>[Service]</literal> section, which carries
111                 information about the service and the process it
112                 supervises. A number of options that may be used in
113                 this section are shared with other unit types. These
114                 options are documented in
115                 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>. The
116                 options specific to the <literal>[Service]</literal>
117                 section of service units are the following:</para>
118
119                 <variablelist>
120                         <varlistentry>
121                                 <term><varname>Type=</varname></term>
122
123                                 <listitem><para>Configures the process
124                                 start-up type for this service
125                                 unit. One of <option>simple</option>,
126                                 <option>forking</option>,
127                                 <option>oneshot</option>,
128                                 <option>dbus</option>,
129                                 <option>notify</option> or
130                                 <option>idle</option>.</para>
131
132                                 <para>If set to
133                                 <option>simple</option> (the default
134                                 value if <varname>BusName=</varname>
135                                 is not specified) it is expected that
136                                 the process configured with
137                                 <varname>ExecStart=</varname> is the
138                                 main process of the service. In this
139                                 mode, if the process offers
140                                 functionality to other processes on
141                                 the system its communication channels
142                                 should be installed before the daemon
143                                 is started up (e.g. sockets set up by
144                                 systemd, via socket activation), as
145                                 systemd will immediately proceed
146                                 starting follow-up units.</para>
147
148                                 <para>If set to
149                                 <option>forking</option> it is
150                                 expected that the process configured
151                                 with <varname>ExecStart=</varname>
152                                 will call <function>fork()</function>
153                                 as part of its start-up. The parent process is
154                                 expected to exit when start-up is
155                                 complete and all communication
156                                 channels set up. The child continues
157                                 to run as the main daemon
158                                 process. This is the behaviour of
159                                 traditional UNIX daemons. If this
160                                 setting is used, it is recommended to
161                                 also use the
162                                 <varname>PIDFile=</varname> option, so
163                                 that systemd can identify the main
164                                 process of the daemon. systemd will
165                                 proceed starting follow-up units as
166                                 soon as the parent process
167                                 exits.</para>
168
169                                 <para>Behaviour of
170                                 <option>oneshot</option> is similar
171                                 to <option>simple</option>, however
172                                 it is expected that the process has to
173                                 exit before systemd starts follow-up
174                                 units. <varname>RemainAfterExit=</varname>
175                                 is particularly useful for this type
176                                 of service.</para>
177
178                                 <para>Behaviour of
179                                 <option>dbus</option> is similar to
180                                 <option>simple</option>, however it is
181                                 expected that the daemon acquires a
182                                 name on the D-Bus bus, as configured
183                                 by
184                                 <varname>BusName=</varname>. systemd
185                                 will proceed starting follow-up units
186                                 after the D-Bus bus name has been
187                                 acquired. Service units with this
188                                 option configured implicitly gain
189                                 dependencies on the
190                                 <filename>dbus.socket</filename>
191                                 unit. This type is the default if
192                                 <varname>BusName=</varname> is
193                                 specified.</para>
194
195                                 <para>Behaviour of
196                                 <option>notify</option> is similar to
197                                 <option>simple</option>, however it is
198                                 expected that the daemon sends a
199                                 notification message via
200                                 <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>
201                                 or an equivalent call when it finished
202                                 starting up. systemd will proceed
203                                 starting follow-up units after this
204                                 notification message has been sent. If
205                                 this option is used
206                                 <varname>NotifyAccess=</varname> (see
207                                 below) should be set to open access to
208                                 the notification socket provided by
209                                 systemd. If
210                                 <varname>NotifyAccess=</varname> is
211                                 not set, it will be implicitly set to
212                                 <option>main</option>.</para>
213
214                                 <para>Behaviour of
215                                 <option>idle</option> is very similar
216                                 to <option>simple</option>, however
217                                 actual execution of a the service
218                                 binary is delayed until all jobs are
219                                 dispatched. This may be used to avoid
220                                 interleaving of output of shell
221                                 services with the status output on the
222                                 console.</para>
223                                 </listitem>
224                         </varlistentry>
225
226                         <varlistentry>
227                                 <term><varname>RemainAfterExit=</varname></term>
228
229                                 <listitem><para>Takes a boolean value
230                                 that specifies whether the service
231                                 shall be considered active even when
232                                 all its processes exited. Defaults to
233                                 <option>no</option>.</para>
234                                 </listitem>
235                         </varlistentry>
236
237                         <varlistentry>
238                                 <term><varname>GuessMainPID=</varname></term>
239
240                                 <listitem><para>Takes a boolean value
241                                 that specifies whether systemd should
242                                 try to guess the main PID of a service
243                                 should if it cannot be determined
244                                 reliably. This option is ignored
245                                 unless <option>Type=forking</option>
246                                 is set and <option>PIDFile=</option>
247                                 is unset because for the other types
248                                 or with an explicitly configured PID
249                                 file the main PID is always known. The
250                                 guessing algorithm might come to
251                                 incorrect conclusions if a daemon
252                                 consists of more than one process. If
253                                 the main PID cannot be determined
254                                 failure detection and automatic
255                                 restarting of a service will not work
256                                 reliably. Defaults to
257                                 <option>yes</option>.</para>
258                                 </listitem>
259                         </varlistentry>
260
261                         <varlistentry>
262                                 <term><varname>PIDFile=</varname></term>
263
264                                 <listitem><para>Takes an absolute file
265                                 name pointing to the PID file of this
266                                 daemon. Use of this option is
267                                 recommended for services where
268                                 <varname>Type=</varname> is set to
269                                 <option>forking</option>. systemd will
270                                 read the PID of the main process of
271                                 the daemon after start-up of the
272                                 service. systemd will not write to the
273                                 file configured here.</para>
274                                 </listitem>
275                         </varlistentry>
276
277                         <varlistentry>
278                                 <term><varname>BusName=</varname></term>
279
280                                 <listitem><para>Takes a D-Bus bus
281                                 name, where this service is reachable
282                                 as. This option is mandatory for
283                                 services where
284                                 <varname>Type=</varname> is set to
285                                 <option>dbus</option>, but its use
286                                 is otherwise recommended as well if
287                                 the process takes a name on the D-Bus
288                                 bus.</para>
289                                 </listitem>
290                         </varlistentry>
291
292                         <varlistentry>
293                                 <term><varname>ExecStart=</varname></term>
294                                 <listitem><para>Takes a command line
295                                 that is executed when this service
296                                 shall be started up. The first token
297                                 of the command line must be an
298                                 absolute file name, then followed by
299                                 arguments for the process. It is
300                                 mandatory to set this option for all
301                                 services. This option may not be
302                                 specified more than once, except when
303                                 <varname>Type=oneshot</varname> is
304                                 used in which case more than one
305                                 <varname>ExecStart=</varname> line is
306                                 accepted which are then invoked one by
307                                 one, sequentially in the order they
308                                 appear in the unit file.</para>
309
310                                 <para>Optionally, if the absolute file
311                                 name is prefixed with
312                                 <literal>@</literal>, the second token
313                                 will be passed as
314                                 <literal>argv[0]</literal> to the
315                                 executed process, followed by the
316                                 further arguments specified. If the
317                                 first token is prefixed with
318                                 <literal>-</literal> an exit code of
319                                 the command normally considered a
320                                 failure (i.e. non-zero exit status or
321                                 abnormal exit due to signal) is ignored
322                                 and considered success. If both
323                                 <literal>-</literal> and
324                                 <literal>@</literal> are used for the
325                                 same command the former must precede
326                                 the latter. Unless
327                                 <varname>Type=forking</varname> is
328                                 set, the process started via this
329                                 command line will be considered the
330                                 main process of the daemon. The
331                                 command line accepts % specifiers as
332                                 described in
333                                 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
334
335                                 <para>On top of that basic environment
336                                 variable substitution is
337                                 supported. Use
338                                 <literal>${FOO}</literal> as part of a
339                                 word, or as word of its own on the
340                                 command line, in which case it will be
341                                 replaced by the value of the
342                                 environment variable including all
343                                 whitespace it contains, resulting in a
344                                 single argument.  Use
345                                 <literal>$FOO</literal> as a separate
346                                 word on the command line, in which
347                                 case it will be replaced by the value
348                                 of the environment variable split up
349                                 at whitespace, resulting in no or more
350                                 arguments. Note that the first
351                                 argument (i.e. the program to execute)
352                                 may not be a variable, and must be a
353                                 literal and absolute path
354                                 name.</para></listitem>
355                         </varlistentry>
356
357                         <varlistentry>
358                                 <term><varname>ExecStartPre=</varname></term>
359                                 <term><varname>ExecStartPost=</varname></term>
360                                 <listitem><para>Additional commands
361                                 that are executed before (resp. after)
362                                 the command in
363                                 <varname>ExecStart=</varname>. Multiple
364                                 command lines may be concatenated in a
365                                 single directive, by separating them
366                                 by semicolons (these semicolons must
367                                 be passed as separate words). In that
368                                 case, the commands are executed one
369                                 after the other,
370                                 serially. Alternatively, these
371                                 directives may be specified more than
372                                 once with the same effect. However,
373                                 the latter syntax is not recommended
374                                 for compatibility with parsers
375                                 suitable for XDG
376                                 <filename>.desktop</filename> files.
377                                 Use of these settings is
378                                 optional. Specifier and environment
379                                 variable substitution is
380                                 supported.</para></listitem>
381                         </varlistentry>
382
383                         <varlistentry>
384                                 <term><varname>ExecReload=</varname></term>
385                                 <listitem><para>Commands to execute to
386                                 trigger a configuration reload in the
387                                 service. This argument takes multiple
388                                 command lines, following the same
389                                 scheme as pointed out for
390                                 <varname>ExecStartPre=</varname>
391                                 above. Use of this setting is
392                                 optional. Specifier and environment
393                                 variable substitution is supported
394                                 here following the same scheme as for
395                                 <varname>ExecStart=</varname>. One
396                                 special environment variable is set:
397                                 if known <literal>$MAINPID</literal> is
398                                 set to the main process of the
399                                 daemon, and may be used for command
400                                 lines like the following:
401                                 <command>/bin/kill -HUP
402                                 $MAINPID</command>.</para></listitem>
403                         </varlistentry>
404
405                         <varlistentry>
406                                 <term><varname>ExecStop=</varname></term>
407                                 <listitem><para>Commands to execute to
408                                 stop the service started via
409                                 <varname>ExecStart=</varname>. This
410                                 argument takes multiple command lines,
411                                 following the same scheme as pointed
412                                 out for
413                                 <varname>ExecStartPre=</varname>
414                                 above. Use of this setting is
415                                 optional. All processes remaining for
416                                 a service after the commands
417                                 configured in this option are run are
418                                 terminated according to the
419                                 <varname>KillMode=</varname> setting
420                                 (see below). If this option is not
421                                 specified the process is terminated
422                                 right-away when service stop is
423                                 requested. Specifier and environment
424                                 variable substitution is supported
425                                 (including
426                                 <literal>$MAINPID</literal>, see
427                                 above).</para></listitem>
428                         </varlistentry>
429
430                         <varlistentry>
431                                 <term><varname>ExecStopPost=</varname></term>
432                                 <listitem><para>Additional commands
433                                 that are executed after the service
434                                 was stopped using the commands
435                                 configured in
436                                 <varname>ExecStop=</varname>. This
437                                 argument takes multiple command lines,
438                                 following the same scheme as pointed
439                                 out for
440                                 <varname>ExecStartPre</varname>. Use
441                                 of these settings is
442                                 optional. Specifier and environment
443                                 variable substitution is
444                                 supported.</para></listitem>
445                         </varlistentry>
446
447                         <varlistentry>
448                                 <term><varname>RestartSec=</varname></term>
449                                 <listitem><para>Configures the time to
450                                 sleep before restarting a service (as
451                                 configured with
452                                 <varname>Restart=</varname>). Takes a
453                                 unit-less value in seconds, or a time
454                                 span value such as "5min
455                                 20s". Defaults to
456                                 100ms.</para></listitem>
457                         </varlistentry>
458
459                         <varlistentry>
460                                 <term><varname>TimeoutSec=</varname></term>
461                                 <listitem><para>Configures the time to
462                                 wait for start-up and stop. If a
463                                 daemon service does not signal
464                                 start-up completion within the
465                                 configured time the service will be
466                                 considered failed and be shut down
467                                 again. If a service is asked to stop
468                                 but does not terminate in the
469                                 specified time it will be terminated
470                                 forcibly via SIGTERM, and after
471                                 another delay of this time with
472                                 SIGKILL. (See
473                                 <varname>KillMode=</varname>
474                                 below.) Takes a unit-less value in seconds, or a
475                                 time span value such as "5min
476                                 20s". Pass 0 to disable the timeout
477                                 logic. Defaults to
478                                 90s, except when <varname>Type=oneshot</varname> is
479                                 used in which case the timeout
480                                 is disabled by default.</para></listitem>
481                         </varlistentry>
482
483                         <varlistentry>
484                                 <term><varname>WatchdogSec=</varname></term>
485                                 <listitem><para>Configures the
486                                 watchdog timeout for a service. This
487                                 is activated when the start-up is
488                                 completed. The service must call
489                                 <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>
490                                 regularly with "WATCHDOG=1" (i.e. the
491                                 "keep-alive ping"). If the time
492                                 between two such calls is larger than
493                                 the configured time then the service
494                                 is placed in a failure state. By
495                                 setting <varname>Restart=</varname> to
496                                 <option>on-failure</option> or
497                                 <option>always</option> the service
498                                 will be automatically restarted. The
499                                 time configured here will be passed to
500                                 the executed service process in the
501                                 <varname>WATCHDOG_USEC=</varname>
502                                 environment variable. This allows
503                                 daemons to automatically enable the
504                                 keep-alive pinging logic if watchdog
505                                 support is enabled for the service. If
506                                 this option is used
507                                 <varname>NotifyAccess=</varname> (see
508                                 below) should be set to open access to
509                                 the notification socket provided by
510                                 systemd. If
511                                 <varname>NotifyAccess=</varname> is
512                                 not set, it will be implicitly set to
513                                 <option>main</option>. Defaults to 0,
514                                 which disables this
515                                 feature.</para></listitem>
516                         </varlistentry>
517
518                         <varlistentry>
519                                 <term><varname>Restart=</varname></term>
520                                 <listitem><para>Configures whether the
521                                 main service process shall be
522                                 restarted when it exits. Takes one of
523                                 <option>no</option>,
524                                 <option>on-success</option>,
525                                 <option>on-failure</option>,
526                                 <option>on-abort</option> or
527                                 <option>always</option>. If set to
528                                 <option>no</option> (the default) the
529                                 service will not be restarted when it
530                                 exits. If set to
531                                 <option>on-success</option> it will be
532                                 restarted only when it exited cleanly,
533                                 i.e. terminated with an exit code of
534                                 0. If set to
535                                 <option>on-failure</option> it will be
536                                 restarted only when it exited with an
537                                 exit code not equalling 0, when
538                                 terminated by a signal, when an
539                                 operation times out or when the
540                                 configured watchdog timeout is
541                                 triggered. If set to
542                                 <option>on-abort</option> it will be
543                                 restarted only if it exits due to
544                                 reception of an uncaught signal. If
545                                 set to <option>always</option> the
546                                 service will be restarted regardless
547                                 whether it exited cleanly or not,
548                                 got terminated abnormally by a
549                                 signal or hit a timeout.</para></listitem>
550                         </varlistentry>
551
552                         <varlistentry>
553                                 <term><varname>PermissionsStartOnly=</varname></term>
554                                 <listitem><para>Takes a boolean
555                                 argument. If true, the permission
556                                 related execution options as
557                                 configured with
558                                 <varname>User=</varname> and similar
559                                 options (see
560                                 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
561                                 for more information) are only applied
562                                 to the process started with
563                                 <varname>ExecStart=</varname>, and not
564                                 to the various other
565                                 <varname>ExecStartPre=</varname>,
566                                 <varname>ExecStartPost=</varname>,
567                                 <varname>ExecReload=</varname>,
568                                 <varname>ExecStop=</varname>,
569                                 <varname>ExecStopPost=</varname>
570                                 commands. If false, the setting is
571                                 applied to all configured commands the
572                                 same way. Defaults to
573                                 false.</para></listitem>
574                         </varlistentry>
575
576                         <varlistentry>
577                                 <term><varname>RootDirectoryStartOnly=</varname></term>
578                                 <listitem><para>Takes a boolean
579                                 argument. If true, the root directory
580                                 as configured with the
581                                 <varname>RootDirectory=</varname>
582                                 option (see
583                                 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
584                                 for more information) is only applied
585                                 to the process started with
586                                 <varname>ExecStart=</varname>, and not
587                                 to the various other
588                                 <varname>ExecStartPre=</varname>,
589                                 <varname>ExecStartPost=</varname>,
590                                 <varname>ExecReload=</varname>,
591                                 <varname>ExecStop=</varname>,
592                                 <varname>ExecStopPost=</varname>
593                                 commands. If false, the setting is
594                                 applied to all configured commands the
595                                 same way. Defaults to
596                                 false.</para></listitem>
597                         </varlistentry>
598
599                         <varlistentry>
600                                 <term><varname>KillMode=</varname></term>
601                                 <listitem><para>Specifies how
602                                 processes of this service shall be
603                                 killed. One of
604                                 <option>control-group</option>,
605                                 <option>process</option>,
606                                 <option>none</option>.</para>
607
608                                 <para>If set to
609                                 <option>control-group</option> all
610                                 remaining processes in the control
611                                 group of this service will be
612                                 terminated on service stop, after the
613                                 stop command (as configured with
614                                 <varname>ExecStop=</varname>) is
615                                 executed. If set to
616                                 <option>process</option> only the main
617                                 process itself is killed. If set to
618                                 <option>none</option> no process is
619                                 killed. In this case only the stop
620                                 command will be executed on service
621                                 stop, but no process be killed
622                                 otherwise. Processes remaining alive
623                                 after stop are left in their control
624                                 group and the control group continues
625                                 to exist after stop unless it is
626                                 empty. Defaults to
627                                 <option>control-group</option>.</para>
628
629                                 <para>Processes will first be
630                                 terminated via SIGTERM (unless the
631                                 signal to send is changed via
632                                 <varname>KillSignal=</varname>). If
633                                 then after a delay (configured via the
634                                 <varname>TimeoutSec=</varname> option)
635                                 processes still remain, the
636                                 termination request is repeated with
637                                 the SIGKILL signal (unless this is
638                                 disabled via the
639                                 <varname>SendSIGKILL=</varname>
640                                 option). See
641                                 <citerefentry><refentrytitle>kill</refentrytitle><manvolnum>2</manvolnum></citerefentry>
642                                 for more
643                                 information.</para></listitem>
644                         </varlistentry>
645
646                         <varlistentry>
647                                 <term><varname>KillSignal=</varname></term>
648                                 <listitem><para>Specifies which signal
649                                 to use when killing a
650                                 service. Defaults to SIGTERM.
651                                 </para></listitem>
652                         </varlistentry>
653
654                         <varlistentry>
655                                 <term><varname>SendSIGKILL=</varname></term>
656                                 <listitem><para>Specifies whether to
657                                 send SIGKILL to remaining processes
658                                 after a timeout, if the normal
659                                 shutdown procedure left processes of
660                                 the service around. Takes a boolean
661                                 value. Defaults to "yes".
662                                 </para></listitem>
663                         </varlistentry>
664
665                         <varlistentry>
666                                 <term><varname>NonBlocking=</varname></term>
667                                 <listitem><para>Set O_NONBLOCK flag
668                                 for all file descriptors passed via
669                                 socket-based activation. If true, all
670                                 file descriptors >= 3 (i.e. all except
671                                 STDIN/STDOUT/STDERR) will have
672                                 the O_NONBLOCK flag set and hence are in
673                                 non-blocking mode. This option is only
674                                 useful in conjunction with a socket
675                                 unit, as described in
676                                 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>. Defaults
677                                 to false.</para></listitem>
678                         </varlistentry>
679
680                         <varlistentry>
681                                 <term><varname>NotifyAccess=</varname></term>
682                                 <listitem><para>Controls access to the
683                                 service status notification socket, as
684                                 accessible via the
685                                 <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>
686                                 call. Takes one of
687                                 <option>none</option> (the default),
688                                 <option>main</option> or
689                                 <option>all</option>. If
690                                 <option>none</option> no daemon status
691                                 updates are accepted from the service
692                                 processes, all status update messages
693                                 are ignored. If <option>main</option>
694                                 only service updates sent from the
695                                 main process of the service are
696                                 accepted. If <option>all</option> all
697                                 services updates from all members of
698                                 the service's control group are
699                                 accepted. This option should be set to
700                                 open access to the notification socket
701                                 when using
702                                 <varname>Type=notify</varname> or
703                                 <varname>WatchdogUsec=</varname> (see
704                                 above). If those options are used but
705                                 <varname>NotifyAccess=</varname> not
706                                 configured it will be implicitly set
707                                 to
708                                 <option>main</option>.</para></listitem>
709                         </varlistentry>
710
711                         <varlistentry>
712                                 <term><varname>Sockets=</varname></term>
713                                 <listitem><para>Specifies the name of
714                                 the socket units this service shall
715                                 inherit the sockets from when the
716                                 service is started. Normally it
717                                 should not be necessary to use this
718                                 setting as all sockets whose unit
719                                 shares the same name as the service
720                                 (ignoring the different suffix of course)
721                                 are passed to the spawned
722                                 process.</para>
723
724                                 <para>Note that the same socket may be
725                                 passed to multiple processes at the
726                                 same time. Also note that a different
727                                 service may be activated on incoming
728                                 traffic than inherits the sockets. Or
729                                 in other words: The
730                                 <varname>Service=</varname> setting of
731                                 <filename>.socket</filename> units
732                                 doesn't have to match the inverse of the
733                                 <varname>Sockets=</varname> setting of
734                                 the <filename>.service</filename> it
735                                 refers to.</para></listitem>
736                         </varlistentry>
737
738                         <varlistentry>
739                                 <term><varname>StartLimitInterval=</varname></term>
740                                 <term><varname>StartLimitBurst=</varname></term>
741
742                                 <listitem><para>Configure service
743                                 start rate limiting. By default
744                                 services which are started more often
745                                 than 5 times within 10s are not
746                                 permitted to start any more times
747                                 until the 10s interval ends. With
748                                 these two options this rate limiting
749                                 may be modified. Use
750                                 <varname>StartLimitInterval=</varname>
751                                 to configure the checking interval
752                                 (defaults to 10s, set to 0 to disable
753                                 any kind of rate limiting). Use
754                                 <varname>StartLimitBurst=</varname> to
755                                 configure how many starts per interval
756                                 are allowed (defaults to 5). These
757                                 configuration options are particularly
758                                 useful in conjunction with
759                                 <varname>Restart=</varname>.</para></listitem>
760                         </varlistentry>
761
762                         <varlistentry>
763                                 <term><varname>StartLimitAction=</varname></term>
764
765                                 <listitem><para>Configure the action
766                                 to take if the rate limit configured
767                                 with
768                                 <varname>StartLimitInterval=</varname>
769                                 and
770                                 <varname>StartLimitBurst=</varname> is
771                                 hit. Takes one of
772                                 <option>none</option>,
773                                 <option>reboot</option>,
774                                 <option>reboot-force</option> or
775                                 <option>reboot-immediate</option>. If
776                                 <option>none</option> is set,
777                                 hitting the rate limit will trigger no
778                                 action besides that the start will not
779                                 be
780                                 permitted. <option>reboot</option>
781                                 causes a reboot following the normal
782                                 shutdown procedure (i.e. equivalent to
783                                 <command>systemctl reboot</command>),
784                                 <option>reboot-force</option> causes
785                                 an forced reboot which will terminate
786                                 all processes forcibly but should
787                                 cause no dirty file systems on reboot
788                                 (i.e. equivalent to <command>systemctl
789                                 reboot -f</command>) and
790                                 <option>reboot-immediate</option>
791                                 causes immediate execution of the
792                                 <citerefentry><refentrytitle>reboot</refentrytitle><manvolnum>2</manvolnum></citerefentry>
793                                 system call, which might result in
794                                 data loss.  Defaults to
795                                 <option>none</option>.</para></listitem>
796                         </varlistentry>
797
798                 </variablelist>
799         </refsect1>
800
801         <refsect1>
802                 <title>Compatibility Options</title>
803
804                 <para>The following options are also available in the
805                 <literal>[Service]</literal> section, but exist purely
806                 for compatibility reasons and should not be used in
807                 newly written service files.</para>
808
809                 <variablelist>
810                         <varlistentry>
811                                 <term><varname>SysVStartPriority=</varname></term>
812                                 <listitem><para>Set the SysV start
813                                 priority to use to order this service
814                                 in relation to SysV services lacking
815                                 LSB headers. This option is only
816                                 necessary to fix ordering in relation
817                                 to legacy SysV services, that have no
818                                 ordering information encoded in the
819                                 script headers. As such it should only
820                                 be used as temporary compatibility
821                                 option, and not be used in new unit
822                                 files. Almost always it is a better
823                                 choice to add explicit ordering
824                                 directives via
825                                 <varname>After=</varname> or
826                                 <varname>Before=</varname>,
827                                 instead. For more details see
828                                 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>. If
829                                 used, pass an integer value in the
830                                 range 0-99.</para></listitem>
831                         </varlistentry>
832
833                         <varlistentry>
834                                 <term><varname>FsckPassNo=</varname></term>
835                                 <listitem><para>Set the fsck passno
836                                 priority to use to order this service
837                                 in relation to other file system
838                                 checking services. This option is only
839                                 necessary to fix ordering in relation
840                                 to fsck jobs automatically created for
841                                 all <filename>/etc/fstab</filename>
842                                 entries with a value in the fs_passno
843                                 column > 0. As such it should only be
844                                 used as option for fsck
845                                 services. Almost always it is a better
846                                 choice to add explicit ordering
847                                 directives via
848                                 <varname>After=</varname> or
849                                 <varname>Before=</varname>,
850                                 instead. For more details see
851                                 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>. If
852                                 used, pass an integer value in the
853                                 same range as
854                                 <filename>/etc/fstab</filename>'s
855                                 fs_passno column. See
856                                 <citerefentry><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>
857                                 for details.</para></listitem>
858                         </varlistentry>
859
860                 </variablelist>
861         </refsect1>
862
863         <refsect1>
864                   <title>See Also</title>
865                   <para>
866                           <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
867                           <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
868                           <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
869                           <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
870                   </para>
871         </refsect1>
872
873 </refentry>