Permalink
Browse files

Check for a default site before disabling it.

The build fails on our centos63 platform because the default site is not
enabled and the `a2dissite` command throws an error when it does not find it.
This commit corrects this issue by making sure that command is only envoked
when a default site is present.

Note that in the current apache2 cookbook `default['apache']['default_site_enabled']`
is set to `false` for all platforms.
  • Loading branch information...
1 parent 50d11cf commit 75f70658c9c44f6804a04ccac452c150db7d9f70 @dkinzer dkinzer committed Feb 13, 2013
Showing with 1 addition and 0 deletions.
  1. +1 −0 recipes/default.rb
View
@@ -108,4 +108,5 @@
execute "disable-default-site" do
command "sudo a2dissite default"
notifies :reload, "service[apache2]", :delayed
+ only_if do File.exists? "#{node['apache']['dir']}/sites-enabled/default" end
end

0 comments on commit 75f7065

Please sign in to comment.