From: Tom Hughes Date: Mon, 19 Sep 2016 18:16:29 +0000 (+0100) Subject: Ensure /var/run/renderd is created when renderd is started X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/ac70ce25a040b80b712d556692b99f16408c71f3?ds=sidebyside Ensure /var/run/renderd is created when renderd is started --- diff --git a/cookbooks/systemd/resources/service.rb b/cookbooks/systemd/resources/service.rb index 622144101..43d937853 100644 --- a/cookbooks/systemd/resources/service.rb +++ b/cookbooks/systemd/resources/service.rb @@ -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, diff --git a/cookbooks/systemd/templates/default/service.erb b/cookbooks/systemd/templates/default/service.erb index 6d2b85e81..703d64281 100644 --- a/cookbooks/systemd/templates/default/service.erb +++ b/cookbooks/systemd/templates/default/service.erb @@ -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 -%> diff --git a/cookbooks/tile/recipes/default.rb b/cookbooks/tile/recipes/default.rb index 4bfbcb455..cdf2474e7 100644 --- a/cookbooks/tile/recipes/default.rb +++ b/cookbooks/tile/recipes/default.rb @@ -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