add changes entry
[external/systemd.git] / man / systemd.path.5
1 '\" t
2 .\"     Title: systemd.path
3 .\"    Author: Lennart Poettering <lennart@poettering.net>
4 .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
5 .\"      Date: 02/15/2012
6 .\"    Manual: systemd.path
7 .\"    Source: systemd
8 .\"  Language: English
9 .\"
10 .TH "SYSTEMD\&.PATH" "5" "02/15/2012" "systemd" "systemd.path"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 systemd.path \- systemd path configuration files
32 .SH "SYNOPSIS"
33 .PP
34 systemd\&.path
35 .SH "DESCRIPTION"
36 .PP
37 A unit configuration file whose name ends in
38 \&.path
39 encodes information about a path monitored by systemd, for path\-based activation\&.
40 .PP
41 This man page lists the configuration options specific to this unit type\&. See
42 \fBsystemd.unit\fR(5)
43 for the common options of all unit configuration files\&. The common configuration items are configured in the generic [Unit] and [Install] sections\&. The path specific configuration options are configured in the [Path] section\&.
44 .PP
45 For each path file, a matching unit file must exist, describing the unit to activate when the path changes\&. By default, a service by the same name as the path (except for the suffix) is activated\&. Example: a path file
46 foo\&.path
47 activates a matching service
48 foo\&.service\&. The unit to activate may be controlled by
49 \fIUnit=\fR
50 (see below)\&.
51 .PP
52 Internally, path units use the
53 \fBinotify\fR(7)
54 API to monitor file systems\&. Due to that, it suffers by the same limitations as inotify, and for example cannot be used to monitor files or directories changed by other machines on remote NFS file systems\&.
55 .PP
56 If an path unit is beneath another mount point in the file system hierarchy, a dependency between both units is created automatically\&.
57 .PP
58 Unless
59 \fIDefaultDependencies=\fR
60 is set to
61 \fBfalse\fR, path units will implicitly have dependencies of type
62 \fIConflicts=\fR
63 and
64 \fIBefore=\fR
65 on
66 shutdown\&.target\&. These ensure that path units are terminated cleanly prior to system shutdown\&. Only path units involved with early boot or late system shutdown should disable this option\&.
67 .SH "OPTIONS"
68 .PP
69 Path files must include a [Path] section, which carries information about the path(s) it monitors\&. The options specific to the [Path] section of path units are the following:
70 .PP
71 \fIPathExists=\fR, \fIPathExistsGlob=\fR, \fIPathChanged=\fR, \fIPathModified=\fR, \fIDirectoryNotEmpty=\fR
72 .RS 4
73 Defines paths to monitor for certain changes:
74 \fIPathExists=\fR
75 may be used to watch the mere existence of a file or directory\&. If the file specified exists the configured unit is activated\&.
76 \fIPathExistsGlob=\fR
77 works similar, but checks for the existance of at least one file matching the globbing pattern specified\&.
78 \fIPathChanged=\fR
79 may be used to watch a file or directory and activate the configured unit whenever it changes\&. It is not activated on every write to the watched file but it is activated if the file which was open for writing gets closed\&.
80 \fIPathModified=\fR
81 is similar, but additionally it is activated also on simple writes to the watched file\&.
82 \fIDirectoryNotEmpty=\fR
83 may be used to watch a directory and activate the configured unit whenever it contains at least one file\&.
84 .sp
85 The arguments of these directives must be absolute file system paths\&.
86 .sp
87 Multiple directives may be combined, of the same and of different types, to watch multiple paths\&.
88 .sp
89 If a path is already existing (in case of
90 \fIPathExists=\fR
91 and
92 \fIPathExistsGlob=\fR) or a directory already is not empty (in case of
93 \fIDirectoryNotEmpty=\fR) at the time the path unit is activated, then the configured unit is immediately activated as well\&. Something similar does not apply to
94 \fIPathChanged=\fR\&.
95 .RE
96 .PP
97 \fIUnit=\fR
98 .RS 4
99 The unit to activate when any of the configured paths changes\&. The argument is a unit name, whose suffix is not
100 \&.path\&. If not specified, this value defaults to a service that has the same name as the path unit, except for the suffix\&. (See above\&.) It is recommended that the unit name that is activated and the unit name of the path unit are named identical, except for the suffix\&.
101 .RE
102 .PP
103 \fIMakeDirectory=\fR
104 .RS 4
105 Takes a boolean argument\&. If true the directories to watch are created before watching\&. This option is ignored for
106 \fIPathExists=\fR
107 settings\&. Defaults to
108 \fBfalse\fR\&.
109 .RE
110 .PP
111 \fIDirectoryMode=\fR
112 .RS 4
113 If
114 \fIMakeDirectory=\fR
115 is enabled use the mode specified here to create the directories in question\&. Takes an access mode in octal notation\&. Defaults to
116 \fB0755\fR\&.
117 .RE
118 .SH "SEE ALSO"
119 .PP
120
121 \fBsystemd\fR(1),
122 \fBsystemctl\fR(8),
123 \fBsystemd.unit\fR(5),
124 \fBsystemd.service\fR(5),
125 \fBinotify\fR(7)
126 .SH "AUTHOR"
127 .PP
128 \fBLennart Poettering\fR <\&lennart@poettering\&.net\&>
129 .RS 4
130 Developer
131 .RE