A service can be automatically restarted when files are modified in watched directories.
To enable this feature, add a watch entry to the service definition:
Files or directories can also be watched using filters to include or exclude specific patterns (see [Files and Paths filtering]):
The following restrictions apply:
paths does not exist at that time, it will not be monitored.Files and paths filtering is based on globbing rules, as implemented by globset.
Important: on Linux globbing is applied in two stages:
The include and exclude rules are applied at both stages.
Some built-in exclusions are always enabled:
These patterns exclude hidden files, directories prefixed with build or target, and common compiler object files (C and Python).
? -- matches any single character* -- matches zero or more characters (excluding directory separators /)** -- recursively matches directories{a.b} -- match any of the listed patterns[ab] -- matches any of the given characters
(use [!ab] to match any character except a and b)