From ac70ce25a040b80b712d556692b99f16408c71f3 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 19 Sep 2016 19:16:29 +0100 Subject: [PATCH] Ensure /var/run/renderd is created when renderd is started --- cookbooks/systemd/resources/service.rb | 2 ++ cookbooks/systemd/templates/default/service.erb | 6 ++++++ cookbooks/tile/recipes/default.rb | 1 + 3 files changed, 9 insertions(+) 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 -- 2.39.5