]>
Commit | Line | Data |
---|---|---|
d1ab0ca0 LP |
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 General Public License as published by | |
13 | the Free Software Foundation; either version 2 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 | General Public License for more details. | |
20 | ||
21 | You should have received a copy of the GNU 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 | ||
1f812fea | 57 | <para>A unit configuration file whose name ends in |
65232ea7 LP |
58 | <filename>.service</filename> encodes information |
59 | about a process controlled and supervised by | |
60 | systemd.</para> | |
d1ab0ca0 LP |
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 | |
0d624a78 | 66 | files. The common configuration items are configured |
62adf224 LP |
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> | |
0d624a78 | 71 | |
ba60f905 LP |
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> | |
62adf224 LP |
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> | |
59a3e1bc LP |
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.</para> | |
d1ab0ca0 LP |
99 | </refsect1> |
100 | ||
101 | <refsect1> | |
102 | <title>Options</title> | |
103 | ||
62adf224 LP |
104 | <para>Service files must include a |
105 | <literal>[Service]</literal> section, which carries | |
106 | information about the service and the process it | |
107 | supervises. A number of options that may be used in | |
108 | this section are shared with other unit types. These | |
109 | options are documented in | |
0d624a78 | 110 | <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>. The |
62adf224 LP |
111 | options specific to the <literal>[Service]</literal> |
112 | section of service units are the following:</para> | |
0d624a78 | 113 | |
d1ab0ca0 LP |
114 | <variablelist> |
115 | <varlistentry> | |
116 | <term><varname>Type=</varname></term> | |
0d624a78 LP |
117 | |
118 | <listitem><para>Configures the process | |
119 | start-up type for this service | |
120 | unit. One of <option>simple</option>, | |
121 | <option>forking</option>, | |
34e9ba66 | 122 | <option>oneshot</option>, |
0d624a78 LP |
123 | <option>dbus</option>, |
124 | <option>notify</option>.</para> | |
125 | ||
126 | <para>If set to | |
127 | <option>simple</option> (the default | |
128 | value) it is expected that the process | |
129 | configured with | |
130 | <varname>ExecStart=</varname> is the | |
131 | main process of the service. In this | |
b1690fe7 LP |
132 | mode, if the process offers |
133 | functionality to other processes on | |
134 | the system its communication channels | |
135 | should be installed before the daemon | |
136 | is started up (e.g. sockets set up by | |
137 | systemd, via socket activation), as | |
138 | systemd will immediately proceed | |
139 | starting follow-up units.</para> | |
0d624a78 LP |
140 | |
141 | <para>If set to | |
142 | <option>forking</option> it is | |
143 | expected that the process configured | |
144 | with <varname>ExecStart=</varname> | |
b1690fe7 LP |
145 | will call <function>fork()</function> |
146 | as part of its start-up. The parent process is | |
147 | expected to exit when start-up is | |
148 | complete and all communication | |
149 | channels set up. The child continues | |
150 | to run as the main daemon | |
151 | process. This is the behaviour of | |
152 | traditional UNIX daemons. If this | |
0d624a78 LP |
153 | setting is used, it is recommended to |
154 | also use the | |
155 | <varname>PIDFile=</varname> option, so | |
156 | that systemd can identify the main | |
157 | process of the daemon. systemd will | |
158 | proceed starting follow-up units as | |
159 | soon as the parent process | |
160 | exits.</para> | |
161 | ||
162 | <para>Behaviour of | |
34e9ba66 | 163 | <option>oneshot</option> is similar |
0d624a78 LP |
164 | to <option>simple</option>, however |
165 | it is expected that the process has to | |
166 | exit before systemd starts follow-up | |
02ee865a | 167 | units. <varname>RemainAfterExit=</varname> |
0d624a78 LP |
168 | is particularly useful for this type |
169 | of service.</para> | |
170 | ||
171 | <para>Behaviour of | |
172 | <option>dbus</option> is similar to | |
62adf224 LP |
173 | <option>simple</option>, however it is |
174 | expected that the daemon acquires a | |
0d624a78 LP |
175 | name on the D-Bus bus, as configured |
176 | by | |
177 | <varname>BusName=</varname>. systemd | |
178 | will proceed starting follow-up units | |
179 | after the D-Bus bus name has been | |
62adf224 | 180 | acquired. Service units with this |
b1690fe7 | 181 | option configured implicitly gain |
62adf224 LP |
182 | dependencies on the |
183 | <filename>dbus.target</filename> | |
184 | unit.</para> | |
0d624a78 LP |
185 | |
186 | <para>Behaviour of | |
187 | <option>notify</option> is similar to | |
188 | <option>simple</option>, however it is | |
189 | expected that the daemon sends a | |
190 | notification message via | |
191 | <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry> | |
192 | or an equivalent call when it finished | |
193 | starting up. systemd will proceed | |
194 | starting follow-up units after this | |
195 | notification message has been sent. If | |
196 | this option is used | |
62adf224 | 197 | <varname>NotifyAccess=</varname> (see |
b1690fe7 | 198 | below) should be set to open access to |
0d624a78 | 199 | the notification socket provided by |
62adf224 LP |
200 | systemd. If |
201 | <varname>NotifyAccess=</varname> is not | |
b1690fe7 | 202 | set, it will implicitly be set to |
62adf224 | 203 | <option>main</option>.</para> |
d1ab0ca0 LP |
204 | </listitem> |
205 | </varlistentry> | |
0d624a78 | 206 | |
d1ab0ca0 | 207 | <varlistentry> |
02ee865a | 208 | <term><varname>RemainAfterExit=</varname></term> |
0d624a78 LP |
209 | |
210 | <listitem><para>Takes a boolean value | |
211 | that specifies whether the service | |
212 | shall be considered active even when | |
213 | all its processes exited. Defaults to | |
214 | <option>no</option>.</para> | |
d1ab0ca0 LP |
215 | </listitem> |
216 | </varlistentry> | |
217 | ||
218 | <varlistentry> | |
219 | <term><varname>PIDFile=</varname></term> | |
0d624a78 LP |
220 | |
221 | <listitem><para>Takes an absolute file | |
222 | name pointing to the PID file of this | |
223 | daemon. Use of this option is | |
224 | recommended for services where | |
225 | <varname>Type=</varname> is set to | |
be039669 LP |
226 | <option>forking</option>. systemd will |
227 | read the PID of the main process of | |
228 | the daemon after start-up of the | |
229 | service. systemd will not write to the | |
230 | file configured here.</para> | |
d1ab0ca0 LP |
231 | </listitem> |
232 | </varlistentry> | |
233 | ||
234 | <varlistentry> | |
235 | <term><varname>BusName=</varname></term> | |
0d624a78 LP |
236 | |
237 | <listitem><para>Takes a D-Bus bus | |
238 | name, where this service is reachable | |
239 | as. This option is mandatory for | |
240 | services where | |
241 | <varname>Type=</varname> is set to | |
242 | <option>dbus</option>, but its use | |
243 | is otherwise recommended as well if | |
244 | the process takes a name on the D-Bus | |
245 | bus.</para> | |
d1ab0ca0 LP |
246 | </listitem> |
247 | </varlistentry> | |
248 | ||
249 | <varlistentry> | |
250 | <term><varname>ExecStart=</varname></term> | |
0d624a78 LP |
251 | <listitem><para>Takes a command line |
252 | that is executed when this service | |
253 | shall be started up. The first token | |
254 | of the command line must be an | |
255 | absolute file name, then followed by | |
256 | arguments for the process. It is | |
257 | mandatory to set this option for all | |
258 | services. This option may not be | |
b1690fe7 LP |
259 | specified more than once, except when |
260 | <varname>Type=oneshot</varname> is | |
261 | used in which case more than one | |
262 | <varname>ExecStart=</varname> line is | |
263 | accepted which are then invoked one by | |
264 | one, sequentially in the order they | |
265 | appear in the unit file.</para> | |
266 | ||
267 | <para>Optionally, if the absolute file | |
268 | name is prefixed with | |
269 | <literal>@</literal>, the second token | |
270 | will be passed as | |
62adf224 LP |
271 | <literal>argv[0]</literal> to the |
272 | executed process, followed by the | |
b708e7ce LP |
273 | further arguments specified. If the |
274 | first token is prefixed with | |
b1690fe7 | 275 | <literal>-</literal> an exit code of |
b708e7ce | 276 | the command normally considered a |
b1690fe7 | 277 | failure (i.e. non-zero exit status or |
5471472d | 278 | abnormal exit due to signal) is ignored |
b1690fe7 LP |
279 | and considered success. If both |
280 | <literal>-</literal> and | |
281 | <literal>@</literal> are used for the | |
5471472d | 282 | same command the former must precede |
b1690fe7 | 283 | the latter. Unless |
420a0166 LP |
284 | <varname>Type=forking</varname> is |
285 | set, the process started via this | |
286 | command line will be considered the | |
287 | main process of the daemon. The | |
288 | command line accepts % specifiers as | |
289 | described in | |
290 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>. On | |
291 | top of that basic environment variable | |
292 | substitution is supported, where | |
c24eb49e LP |
293 | <literal>${FOO}</literal> is replaced |
294 | by the string value of the environment | |
295 | variable of the same name. Also | |
296 | <literal>$FOO</literal> may appear as | |
96d4ce01 | 297 | separate word on the command line in |
c24eb49e | 298 | which case the variable is replaced by |
d2f31634 LP |
299 | its value split at whitespaces. Note |
300 | that the first argument (i.e. the | |
301 | binary to execute) may not be a | |
302 | variable, and must be a literal and | |
303 | absolute path name.</para></listitem> | |
0d624a78 LP |
304 | </varlistentry> |
305 | ||
306 | <varlistentry> | |
307 | <term><varname>ExecStartPre=</varname></term> | |
308 | <term><varname>ExecStartPost=</varname></term> | |
309 | <listitem><para>Additional commands | |
310 | that are executed before (resp. after) | |
311 | the command in | |
b3eaa628 LP |
312 | <varname>ExecStart=</varname>. Multiple |
313 | command lines may be concatenated in a | |
c899f8c6 | 314 | single directive, by separating them |
b3eaa628 | 315 | by semicolons (these semicolons must |
96d4ce01 | 316 | be passed as separate words). In that |
b3eaa628 LP |
317 | case, the commands are executed one |
318 | after the other, | |
319 | serially. Alternatively, these | |
320 | directives may be specified more than | |
5471472d | 321 | once with the same effect. However, |
b3eaa628 LP |
322 | the latter syntax is not recommended |
323 | for compatibility with parsers | |
324 | suitable for XDG | |
325 | <filename>.desktop</filename> files. | |
326 | Use of these settings is | |
420a0166 LP |
327 | optional. Specifier and environment |
328 | variable substitution is | |
329 | supported.</para></listitem> | |
0d624a78 LP |
330 | </varlistentry> |
331 | ||
332 | <varlistentry> | |
333 | <term><varname>ExecReload=</varname></term> | |
334 | <listitem><para>Commands to execute to | |
335 | trigger a configuration reload in the | |
b3eaa628 LP |
336 | service. This argument takes multiple |
337 | command lines, following the same | |
338 | scheme as pointed out for | |
339 | <varname>ExecStartPre=</varname> | |
340 | above. Use of this setting is | |
420a0166 LP |
341 | optional. Specifier and environment |
342 | variable substitution is supported | |
343 | here following the same scheme as for | |
344 | <varname>ExecStart=</varname>. One | |
345 | special environment variable is set: | |
346 | if known <literal>$MAINPID</literal> is | |
347 | set to the main process of the | |
348 | daemon, and may be used for command | |
349 | lines like the following: | |
350 | <command>/bin/kill -HUP | |
075b1e86 | 351 | $MAINPID</command>.</para></listitem> |
0d624a78 LP |
352 | </varlistentry> |
353 | ||
354 | <varlistentry> | |
355 | <term><varname>ExecStop=</varname></term> | |
356 | <listitem><para>Commands to execute to | |
357 | stop the service started via | |
b3eaa628 LP |
358 | <varname>ExecStart=</varname>. This |
359 | argument takes multiple command lines, | |
360 | following the same scheme as pointed | |
361 | out for | |
362 | <varname>ExecStartPre=</varname> | |
363 | above. Use of this setting is | |
0d624a78 LP |
364 | optional. All processes remaining for |
365 | a service after the commands | |
366 | configured in this option are run are | |
367 | terminated according to the | |
368 | <varname>KillMode=</varname> setting | |
369 | (see below). If this option is not | |
370 | specified the process is terminated | |
371 | right-away when service stop is | |
420a0166 LP |
372 | requested. Specifier and environment |
373 | variable substitution is supported | |
374 | (including | |
075b1e86 | 375 | <literal>$MAINPID</literal>, see |
420a0166 | 376 | above).</para></listitem> |
0d624a78 LP |
377 | </varlistentry> |
378 | ||
379 | <varlistentry> | |
380 | <term><varname>ExecStopPost=</varname></term> | |
381 | <listitem><para>Additional commands | |
382 | that are executed after the service | |
383 | was stopped using the commands | |
384 | configured in | |
b3eaa628 LP |
385 | <varname>ExecStop=</varname>. This |
386 | argument takes multiple command lines, | |
387 | following the same scheme as pointed | |
388 | out for | |
389 | <varname>ExecStartPre</varname>. Use | |
390 | of these settings is | |
420a0166 LP |
391 | optional. Specifier and environment |
392 | variable substitution is | |
393 | supported.</para></listitem> | |
0d624a78 LP |
394 | </varlistentry> |
395 | ||
396 | <varlistentry> | |
397 | <term><varname>RestartSec=</varname></term> | |
398 | <listitem><para>Configures the time to | |
399 | sleep before restarting a service (as | |
400 | configured with | |
401 | <varname>Restart=</varname>). Takes a | |
402 | unit-less value in seconds, or a time | |
403 | span value such as "5min | |
404 | 20s". Defaults to | |
405 | 100ms.</para></listitem> | |
406 | </varlistentry> | |
407 | ||
408 | <varlistentry> | |
409 | <term><varname>TimeoutSec=</varname></term> | |
410 | <listitem><para>Configures the time to | |
411 | wait for start-up and stop. If a | |
412 | daemon service does not signal | |
413 | start-up completion within the | |
414 | configured time the service will be | |
415 | considered failed and be shut down | |
416 | again. If a service is asked to stop | |
417 | but does not terminate in the | |
418 | specified time it will be terminated | |
419 | forcibly via SIGTERM, and after | |
420 | another delay of this time with | |
421 | SIGKILL. (See | |
62adf224 | 422 | <varname>KillMode=</varname> |
0d624a78 LP |
423 | below.) Takes a unit-less value in seconds, or a |
424 | time span value such as "5min | |
425 | 20s". Pass 0 to disable the timeout | |
426 | logic. Defaults to | |
427 | 60s.</para></listitem> | |
428 | </varlistentry> | |
429 | ||
430 | <varlistentry> | |
431 | <term><varname>Restart=</varname></term> | |
432 | <listitem><para>Configures whether the | |
50caaedb | 433 | main service process shall be |
f8553ccb | 434 | restarted when it exits. Takes one of |
525ee6f4 | 435 | <option>no</option>, |
50caaedb LP |
436 | <option>on-success</option>, |
437 | <option>on-failure</option>, | |
438 | <option>on-abort</option> or | |
439 | <option>always</option>. If set to | |
440 | <option>no</option> (the default) the | |
441 | service will not be restarted when it | |
442 | exits. If set to | |
443 | <option>on-success</option> it will be | |
444 | restarted only when it exited cleanly, | |
445 | i.e. terminated with an exit code of | |
446 | 0. If set to | |
447 | <option>on-failure</option> it will be | |
5471472d | 448 | restarted only when it exited with an |
50caaedb LP |
449 | exit code not equalling 0, or when |
450 | terminated by a signal. If set to | |
451 | <option>on-abort</option> it will be | |
452 | restarted only if it exits due to | |
453 | reception of an uncaught signal. If | |
454 | set to <option>always</option> the | |
0d624a78 LP |
455 | service will be restarted regardless |
456 | whether it exited cleanly or not, or | |
457 | got terminated abnormally by a | |
458 | signal.</para></listitem> | |
459 | </varlistentry> | |
460 | ||
461 | <varlistentry> | |
462 | <term><varname>PermissionsStartOnly=</varname></term> | |
463 | <listitem><para>Takes a boolean | |
464 | argument. If true, the permission | |
465 | related execution options as | |
466 | configured with | |
467 | <varname>User=</varname> and similar | |
468 | options (see | |
469 | <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
470 | for more information) are only applied | |
471 | to the process started with | |
472 | <varname>ExecStart=</varname>, and not | |
473 | to the various other | |
474 | <varname>ExecStartPre=</varname>, | |
475 | <varname>ExecStartPost=</varname>, | |
476 | <varname>ExecReload=</varname>, | |
477 | <varname>ExecStop=</varname>, | |
478 | <varname>ExecStopPost=</varname> | |
479 | commands. If false, the setting is | |
480 | applied to all configured commands the | |
481 | same way. Defaults to | |
482 | false.</para></listitem> | |
483 | </varlistentry> | |
484 | ||
485 | <varlistentry> | |
486 | <term><varname>RootDirectoryStartOnly=</varname></term> | |
487 | <listitem><para>Takes a boolean | |
488 | argument. If true, the root directory | |
489 | as configured with the | |
490 | <varname>RootDirectory=</varname> | |
491 | option (see | |
492 | <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
493 | for more information) is only applied | |
494 | to the process started with | |
495 | <varname>ExecStart=</varname>, and not | |
496 | to the various other | |
497 | <varname>ExecStartPre=</varname>, | |
498 | <varname>ExecStartPost=</varname>, | |
499 | <varname>ExecReload=</varname>, | |
500 | <varname>ExecStop=</varname>, | |
501 | <varname>ExecStopPost=</varname> | |
502 | commands. If false, the setting is | |
503 | applied to all configured commands the | |
504 | same way. Defaults to | |
505 | false.</para></listitem> | |
506 | </varlistentry> | |
507 | ||
508 | <varlistentry> | |
509 | <term><varname>SysVStartPriority=</varname></term> | |
510 | <listitem><para>Set the SysV start | |
511 | priority to use to order this service | |
512 | in relation to SysV services lacking | |
513 | LSB headers. This option is only | |
514 | necessary to fix ordering in relation | |
515 | to legacy SysV services, that have no | |
516 | ordering information encoded in the | |
517 | script headers. As such it should only | |
518 | be used as temporary compatibility | |
519 | option, and not be used in new unit | |
520 | files. Almost always it is a better | |
521 | choice to add explicit ordering | |
522 | directives via | |
523 | <varname>After=</varname> or | |
524 | <varname>Before=</varname>, | |
525 | instead. For more details see | |
526 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>. If | |
527 | used, pass an integer value in the | |
528 | range 0-99.</para></listitem> | |
529 | </varlistentry> | |
530 | ||
531 | <varlistentry> | |
532 | <term><varname>KillMode=</varname></term> | |
533 | <listitem><para>Specifies how | |
534 | processes of this service shall be | |
535 | killed. One of | |
536 | <option>control-group</option>, | |
537 | <option>process-group</option>, | |
538 | <option>process</option>, | |
539 | <option>none</option>.</para> | |
540 | ||
541 | <para>If set to | |
542 | <option>control-group</option> all | |
543 | remaining processes in the control | |
544 | group of this service will be | |
545 | terminated on service stop, after the | |
546 | stop command (as configured with | |
547 | <varname>ExecStop=</varname>) is | |
548 | executed. If set to | |
549 | <option>process-group</option> only | |
550 | the members of the process group of | |
551 | the main service process are | |
552 | killed. If set to | |
553 | <option>process</option> only the main | |
554 | process itself is killed. If set to | |
555 | <option>none</option> no process is | |
556 | killed. In this case only the stop | |
557 | command will be executed on service | |
558 | stop, but no process be killed | |
559 | otherwise. Processes remaining alive | |
560 | after stop are left in their control | |
561 | group and the control group continues | |
562 | to exist after stop unless it is | |
563 | empty. Defaults to | |
f8553ccb | 564 | <option>control-group</option>.</para> |
0d624a78 LP |
565 | |
566 | <para>Processes will first be | |
ba035df2 LP |
567 | terminated via SIGTERM (unless the |
568 | signal to send is changed via | |
2292707d LP |
569 | <varname>KillSignal=</varname>). If |
570 | then after a delay (configured via the | |
62adf224 | 571 | <varname>TimeoutSec=</varname> option) |
0d624a78 LP |
572 | processes still remain, the |
573 | termination request is repeated with | |
ba035df2 LP |
574 | the SIGKILL signal (unless this is |
575 | disabled via the | |
576 | <varname>SendSIGKILL=</varname> | |
577 | option). See | |
0d624a78 LP |
578 | <citerefentry><refentrytitle>kill</refentrytitle><manvolnum>2</manvolnum></citerefentry> |
579 | for more | |
580 | information.</para></listitem> | |
581 | </varlistentry> | |
582 | ||
2292707d LP |
583 | <varlistentry> |
584 | <term><varname>KillSignal=</varname></term> | |
585 | <listitem><para>Specifies which signal | |
586 | to use when killing a | |
587 | service. Defaults to SIGTERM. | |
588 | </para></listitem> | |
589 | </varlistentry> | |
590 | ||
ba035df2 LP |
591 | <varlistentry> |
592 | <term><varname>SendSIGKILL=</varname></term> | |
593 | <listitem><para>Specifies whether to | |
594 | send SIGKILL to remaining processes | |
595 | after a timeout, if the normal | |
596 | shutdown procedure left processes of | |
597 | the service around. Takes a boolean | |
598 | value. Defaults to "yes". | |
599 | </para></listitem> | |
600 | </varlistentry> | |
601 | ||
0d624a78 LP |
602 | <varlistentry> |
603 | <term><varname>NonBlocking=</varname></term> | |
604 | <listitem><para>Set O_NONBLOCK flag | |
605 | for all file descriptors passed via | |
606 | socket-based activation. If true, all | |
607 | file descriptors >= 3 (i.e. all except | |
608 | STDIN/STDOUT/STDERR) will have | |
609 | the O_NONBLOCK flag set and hence are in | |
610 | non-blocking mode. This option is only | |
611 | useful in conjunction with a socket | |
612 | unit, as described in | |
613 | <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>. Defaults | |
614 | to false.</para></listitem> | |
615 | </varlistentry> | |
616 | ||
617 | <varlistentry> | |
618 | <term><varname>NotifyAccess=</varname></term> | |
619 | <listitem><para>Controls access to the | |
620 | service status notification socket, as | |
621 | accessible via the | |
622 | <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry> | |
623 | call. Takes one of | |
624 | <option>none</option> (the default), | |
625 | <option>main</option> or | |
626 | <option>all</option>. If | |
627 | <option>none</option> no daemon status | |
f8553ccb | 628 | updates are accepted from the service |
0d624a78 LP |
629 | processes, all status update messages |
630 | are ignored. If <option>main</option> | |
631 | only service updates sent from the | |
632 | main process of the service are | |
633 | accepted. If <option>all</option> all | |
634 | services updates from all members of | |
635 | the service's control group are | |
636 | accepted. This option must be set to | |
637 | open access to the notification socket | |
638 | when using | |
639 | <varname>Type=notify</varname> (see above).</para></listitem> | |
d1ab0ca0 LP |
640 | </varlistentry> |
641 | ||
f72192c0 LP |
642 | <varlistentry> |
643 | <term><varname>Sockets=</varname></term> | |
644 | <listitem><para>Specifies the name of | |
645 | the socket units this service shall | |
646 | inherit the sockets from when the | |
647 | service (ignoring the different suffix | |
648 | of course) is started. Normally it | |
649 | should not be necessary to use this | |
650 | setting as all sockets whose unit | |
651 | shares the same name as the service | |
652 | are passed to the spawned | |
653 | process.</para> | |
654 | ||
655 | <para>Note that the same socket may be | |
656 | passed to multiple processes at the | |
657 | same time. Also note that a different | |
658 | service may be activated on incoming | |
659 | traffic than inherits the sockets. Or | |
660 | in other words: The | |
661 | <varname>Service=</varname> setting of | |
662 | <filename>.socket</filename> units | |
663 | doesn't have to match the inverse of the | |
a1102c1f | 664 | <varname>Sockets=</varname> setting of |
f72192c0 LP |
665 | the <filename>.service</filename> it |
666 | refers to.</para></listitem> | |
667 | </varlistentry> | |
668 | ||
2ba545f1 LP |
669 | <varlistentry> |
670 | <term><varname>FsckPassNo=</varname></term> | |
671 | <listitem><para>Set the fsck passno | |
672 | priority to use to order this service | |
673 | in relation to other file system | |
674 | checking services. This option is only | |
675 | necessary to fix ordering in relation | |
676 | to fsck jobs automatically created for | |
677 | all <filename>/etc/fstab</filename> | |
678 | entries with a value in the fs_passno | |
679 | column > 0. As such it should only be | |
680 | used as option for fsck | |
681 | services. Almost always it is a better | |
682 | choice to add explicit ordering | |
683 | directives via | |
684 | <varname>After=</varname> or | |
685 | <varname>Before=</varname>, | |
686 | instead. For more details see | |
687 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>. If | |
688 | used, pass an integer value in the | |
689 | same range as | |
690 | <filename>/etc/fstab</filename>'s | |
691 | fs_passno column. See | |
692 | <citerefentry><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
693 | for details.</para></listitem> | |
694 | </varlistentry> | |
695 | ||
d1ab0ca0 LP |
696 | </variablelist> |
697 | </refsect1> | |
698 | ||
699 | <refsect1> | |
700 | <title>See Also</title> | |
701 | <para> | |
f3e219a2 | 702 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, |
0d624a78 LP |
703 | <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>, |
704 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
705 | <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
d1ab0ca0 LP |
706 | </para> |
707 | </refsect1> | |
708 | ||
709 | </refentry> |