Skip to content

Commit

Permalink
Merge pull request #152 from dpkp/init_file_permissions
Browse files Browse the repository at this point in the history
Upstart and systemd config files do not need +x permissions
  • Loading branch information
johnbellone committed Apr 2, 2015
2 parents 992025a + a18f817 commit 8670b01
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions recipes/_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down

0 comments on commit 8670b01

Please sign in to comment.