[COOK-668] - rearrange postfix service
* Supported platforms (Debian and RHEL families) have status, reload and restart commands in their init scripts, we can specify those as supported by the service. * the service should be enabled at boot time on all platforms * Make sure that the service gets started at the end of the recipe since it wouldn't be started, only restarted, elsewhere.
This commit is contained in:
parent
002bcb8029
commit
251f37a272
@ -22,15 +22,13 @@ package "postfix" do
|
||||
action :install
|
||||
end
|
||||
|
||||
service "postfix" do
|
||||
supports :status => true, :restart => true, :reload => true
|
||||
action :enable
|
||||
end
|
||||
|
||||
case node[:platform]
|
||||
when "ubuntu", "debian"
|
||||
service "postfix" do
|
||||
action :enable
|
||||
end
|
||||
when "redhat", "centos"
|
||||
service "postfix" do
|
||||
action :nothing
|
||||
end
|
||||
when "redhat", "centos", "amazon", "scientific"
|
||||
service "sendmail" do
|
||||
action :nothing
|
||||
end
|
||||
@ -51,3 +49,7 @@ end
|
||||
notifies :restart, resources(:service => "postfix")
|
||||
end
|
||||
end
|
||||
|
||||
service "postfix" do
|
||||
action :start
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user