]> git.openstreetmap.org Git - chef.git/commitdiff
Ensure /var/run/renderd is created when renderd is started
authorTom Hughes <tom@compton.nu>
Mon, 19 Sep 2016 18:16:29 +0000 (19:16 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 19 Sep 2016 18:16:29 +0000 (19:16 +0100)
cookbooks/systemd/resources/service.rb
cookbooks/systemd/templates/default/service.erb
cookbooks/tile/recipes/default.rb

index 6221441018593e8eb04ee5add96ac10804caaec3..43d93785330cc01cbf9137edc337217cdf523945 100644 (file)
@@ -36,6 +36,8 @@ property :exec_start, String, :required => true
 property :exec_start_post, String
 property :exec_stop, String
 property :exec_reload, String
+property :runtime_directory, String
+property :runtime_directory_mode, Fixnum
 property :standard_input, String,
          :is => %w(null tty tty-force tty-fail socket)
 property :standard_output, String,
index 6d2b85e81fac20b5eb8eee12a8f1a18c0582e435..703d6428144f21d77028cb1d247858bf3e23d5bb 100644 (file)
@@ -39,6 +39,12 @@ ExecStop=<%= @exec_stop %>
 <% if @exec_reload -%>
 ExecReload=<%= @exec_reload %>
 <% end -%>
+<% if @runtime_directory -%>
+RuntimeDirectory=<%= @runtime_directory %>
+<% end -%>
+<% if @runtime_directory_mode -%>
+RuntimeDirectoryMode=<%= sprintf("0%o", @runtime_directory_mode) %>
+<% end -%>
 <% if @standard_input -%>
 StandardInput=<%= @standard_input %>
 <% end -%>
index 4bfbcb455140cf4f76d709dadf25b927c0f8e169..cdf2474e74c803287b9433aedd554b7e6cdd8bff 100644 (file)
@@ -68,6 +68,7 @@ systemd_service "renderd" do
   wants "postgresql.service"
   user "www-data"
   exec_start "/usr/bin/renderd -f"
+  runtime_directory "renderd"
   standard_error "null"
   private_tmp true
   private_devices true