Permalink
Browse files

[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.
  • Loading branch information...
1 parent 002bcb8 commit 251f37a272ab059fe0116088719c68d1b2408aac @jtimberman jtimberman committed Apr 9, 2012
Showing with 10 additions and 8 deletions.
  1. +10 −8 recipes/default.rb
View
@@ -22,15 +22,13 @@
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 @@
notifies :restart, resources(:service => "postfix")
end
end
+
+service "postfix" do
+ action :start
+end

0 comments on commit 251f37a

Please sign in to comment.