Skip to content

Commit

Permalink
Trigger apache2 logdir mount and fix logdir on Amazon Linux.
Browse files Browse the repository at this point in the history
  • Loading branch information
Udo Juettner committed Aug 2, 2013
1 parent d99a4db commit 402ab7e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 3 additions & 2 deletions apache2/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,9 @@
# uncomment to get working example site on centos/redhat/fedora/amazon
#apache_site 'default'

service 'apache2' do
action :start
execute "check existence of #{node[:apache][:log_dir]}" do
command "ls -la #{node[:apache][:log_dir]}"
notifies :start, resources(:service => 'apache2')
end

file "#{node[:apache][:document_root]}/index.html" do
Expand Down
7 changes: 6 additions & 1 deletion opsworks_initial_setup/attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,14 @@
default[:opsworks_initial_setup][:bind_mounts][:mounts] = {
"/srv/www" => "/mnt/srv/www",
"/var/www" => "/mnt/var/www",
"/var/log/apache2" => "/mnt/var/log/apache2",
"/var/log/mysql" => "/mnt/var/log/mysql"
}
case node[:platform]
when 'redhat','centos','fedora','amazon'
default[:opsworks_initial_setup][:bind_mounts][:mounts]["/var/log/httpd"] = "/mnt/var/log/apache2"
when 'debian','ubuntu'
default[:opsworks_initial_setup][:bind_mounts][:mounts]["/var/log/apache2"] = "/mnt/var/log/apache2"
end

# landscape removal
default[:opsworks_initial_setup][:landscape][:packages_to_remove] = ['landscape-common', 'landscape-client']

0 comments on commit 402ab7e

Please sign in to comment.