Skip to content

Commit

Permalink
Upstart and systemd config files do not need +x permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
Dana Powers committed Mar 23, 2015
1 parent 76f7831 commit a18f817
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 a18f817

Please sign in to comment.