14
14
directory, and watches for future changes to these files using
17
Files in this directory must end in
17
To be considered by Upstart, files in this directory must have a
18
recognized suffix and may also be present in sub-directories. There are
19
two recognized suffixes:
19
and may also be present in sub-directories.
21
Each file defines a single service or task, with the name taken from its
22
relative path within the directory without the extension. For example a
24
are called configuration files, or simply "conf files" for short.
25
These are the primary vehicle for specifying a job.
29
are called override files. If an override file is present, the stanzas
30
it contains take precedence over those equivalently named stanzas in the
31
corresponding configuration file contents for a particular job.
32
The main use for override files is to modify how a job will run without
33
having to modify its configuration file directly. See the section
34
\fBOverride File Handling\fP below for further details.
36
A job can thus be defined by either:
38
A single configuration file.
40
A single configuration file \fBand\fP a single override file.
42
Unless explicitly stated otherwise, any reference to a jobs
43
configuration can refer both to a configuration file or an override
46
Each configuration file defines the template for a single \fIservice\fP
47
(long-running process or daemon) or \fItask\fP (short-lived process).
49
Note that a configuration file is not itself a job: it is a description
50
of an environmenta job could be run in. A job is the runtime embodiment
51
of a configuration file.
53
The configuration file name as displayed by Upstart and associated
54
tooling is taken from its relative path within the directory without the
55
extension. For example a configuration file
24
56
.I /etc/init/rc-sysinit.conf
27
while a job defined in
59
while a configuration file
28
60
.I /etc/init/net/apache.conf
63
Since override files only modify the way a configuration file is
64
interpreted, they are not named.
32
These files are plain text and should not be executable.
66
Configuration files are plain text and should not be executable.
68
.SS Configuration File Format
35
69
Each line begins with a configuration stanza and continues until either
36
70
the end of the line or a line containing a closing stanza. Line breaks
37
71
within a stanza are permitted within single or double quotes, or if
572
606
may be specified for either.
608
.SS Override File Handling
609
Override files allow a jobs environment to be changed without modifying
610
the jobs configuration file. Rules governing override files:
613
If a job is embodied with only a configuration file, the contents of
614
this file define the job.
616
If an override files exists where there is no existing cofiguration
617
file, the override file is ignored.
619
If both a configuration file \fBand\fP an override file exist for a job
620
and both files are syntactically correct:
623
stanzas in the override file will take precedence over stanzas present
624
in the corresponding configuration file.
626
stanzas in the override file which are not present in the corresponding
627
configuration file will be honoured when the job runs.
630
If both a configuration file and an override file exist for a job and
631
subsequently the override file is deleted, the configuration file is
632
automatically reloaded with the effect that any changes introduced by
633
the override file are undone and the configuration file alone now defines
636
If both a configuration file and an override file exist for a job and
637
subsequently the configuration file is deleted, a new instance of the
638
job can no longer be started (since without a corresponding
639
configuration file an override file is ignored).
641
If both a configuration file and an override file exist for a job and
642
any of the contents of the override file are invalid, the override file
643
is ignored and only the contents of the configuration file are
574
648
.SS Miscellaneous
576
650
.B kill signal \fISIGNAL