lib/poolparty/plugins/apache.rb in auser-poolparty-1.3.16 vs lib/poolparty/plugins/apache.rb in auser-poolparty-1.3.17

- old
+ new

@@ -7,10 +7,15 @@ default_options :port => 80, :www_user => 'www-data', :www_dir => "/var/www", :passenger_version => "2.2.5" + + def name + "apache" + end + def before_load installed_as_worker configs has_service("apache2", :requires => get_package("apache2")) has_user "www-data" @@ -144,11 +149,11 @@ has_chef_attributes_file PoolParty.lib_dir/"vendor"/"chef"/"apache2"/"attributes"/"apache.rb" end def enable_default listen 80 # assumes no haproxy - site "default-site", :template => File.dirname(__FILE__)/:apache2/"default-site.conf.erb" + site "default-site", :template => File.dirname(__FILE__)/:apache2/"default-site.conf.erb", :notifies => get_exec("reload-apache2"), :requires => get_exec("reload-apache2") end def config(name, temp) has_file(:name => "/etc/apache2/conf.d/#{name}.conf") do template File.dirname(__FILE__)/temp @@ -167,10 +172,10 @@ if exists? install_site(name, opts) else has_exec(:command => "/usr/sbin/a2dissite #{name}") do notifies get_exec("reload-apache2"), :run - requires get_package("apache2") + requires get_exec("reload-apache2") only_if "/bin/sh -c \"[ -L /etc/apache2/sites-enabled/#{name} ] && [ /etc/apache2/sites-enabled/#{name} -ef /etc/apache2/sites-available/#{name}]\"" end end end