]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/systemd/templates/default/path.erb
Add support for systemd path units
[chef.git] / cookbooks / systemd / templates / default / path.erb
diff --git a/cookbooks/systemd/templates/default/path.erb b/cookbooks/systemd/templates/default/path.erb
new file mode 100644 (file)
index 0000000..8d0852b
--- /dev/null
@@ -0,0 +1,37 @@
+# DO NOT EDIT - This file is being maintained by Chef
+
+[Unit]
+Description=<%= @description %>
+<% if @after -%>
+After=<%= Array(@after).join(" ") %>
+<% end -%>
+<% if @wants -%>
+Wants=<%= Array(@wants).join(" ") %>
+<% end -%>
+
+[Path]
+<% Array(@path_exists).each do |path| -%>
+PathExists=<%= path %>
+<% end -%>
+<% Array(@path_exists_glob).each do |path| -%>
+PathExistsGlob=<%= path %>
+<% end -%>
+<% Array(@path_changed).each do |path| -%>
+PathChanged=<%= path %>
+<% end -%>
+<% Array(@path_modified).each do |path| -%>
+PathModified=<%= path %>
+<% end -%>
+<% Array(@directory_not_empty).each do |path| -%>
+DirectoryNotEmpty=<%= path %>
+<% end -%>
+Unit=<%= @unit %>
+<% if @make_directory -%>
+MakeDirectory=<%= @make_directory %>
+<% end -%>
+<% if @directory_mode -%>
+DirectoryMode=<%= sprintf("0%o", @directory_mode) %>
+<% end -%>
+
+[Install]
+WantedBy=multi-user.target