From a18f817d4745f386d4f9a0d2ab09b0cfee0d6e72 Mon Sep 17 00:00:00 2001 From: Dana Powers Date: Sun, 22 Mar 2015 22:29:07 -0700 Subject: [PATCH] Upstart and systemd config files do not need +x permissions --- recipes/_service.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/recipes/_service.rb b/recipes/_service.rb index d45ee70c..ca68d5bd 100644 --- a/recipes/_service.rb +++ b/recipes/_service.rb @@ -194,20 +194,22 @@ if platform?("ubuntu") init_file = '/etc/init/consul.conf' init_tmpl = 'consul.conf.erb' + init_mode = 0644 else init_file = '/etc/init.d/consul' init_tmpl = 'consul-init.erb' + init_mode = 0755 end template node['consul']['etc_config_dir'] do source 'consul-sysconfig.erb' - mode 0755 + mode 0644 notifies :create, "template[#{init_file}]", :immediately end template init_file do source init_tmpl - mode 0755 + mode init_mode notifies :restart, 'service[consul]', :immediately end @@ -234,7 +236,7 @@ when 'systemd' template '/etc/systemd/system/consul.service' do source 'consul-systemd.erb' - mode 0755 + mode 0644 notifies :restart, 'service[consul]', :immediately end