- apache_site "#{name}.dev.openstreetmap.org" do
- template "apache.user.erb"
- directory "#{user_home}/public_html"
- variables :user => name
- end
- end
+ user_home = details[:home] || account["home"] || "#{node[:accounts][:home]}/#{name}"
+
+ next unless File.directory?("#{user_home}/public_html")
+
+ port = 7000 + account["uid"].to_i
+
+ template "/etc/php5/fpm/pool.d/#{name}.conf" do
+ source "fpm.conf.erb"
+ owner "root"
+ group "root"
+ mode 0644
+ variables :user => name, :port => port
+ notifies :reload, "service[php5-fpm]"
+ end
+
+ apache_site "#{name}.dev.openstreetmap.org" do
+ template "apache.user.erb"
+ directory "#{user_home}/public_html"
+ variables :user => name, :port => port