Skip to content

Commit

Permalink
Adds support for 14.04
Browse files Browse the repository at this point in the history
  • Loading branch information
cwebberOps committed Oct 16, 2014
1 parent 3ac48ca commit e1d7b8e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ platforms:
driver_config:
network:
- ["forwarded_port", {guest: 80, host: 8080, guest: 443, host: 8443}]
- name: ubuntu-14.04
driver_config:
network:
- ["forwarded_port", {guest: 80, host: 8080, guest: 443, host: 8443}]
- name: centos-6.5
driver_config:
network:
Expand Down
20 changes: 14 additions & 6 deletions recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,19 @@
webserver = node[:magento][:webserver]
user = node[:magento][:user]
group = node[webserver]['group']
php_conf = if platform?('centos', 'redhat')
['/etc', '/etc/php.d']
else
['/etc/php5/fpm', '/etc/php5/conf.d']
end

if platform?('centos', 'redhat')
php_conf = ['/etc', '/etc/php.d']
apc_config = 'apc.ini'
else
if platform?('ubuntu') && node[:platform_version] == '14.04'
php_conf = ['/etc/php5/fpm', '/etc/php5/fpm/conf.d']
apc_config = '20-apcu.ini'
else
php_conf = ['/etc/php5/fpm', '/etc/php5/conf.d']
apc_config = 'apc.ini'
end
end

user "#{user}" do
comment 'magento guy'
Expand Down Expand Up @@ -58,7 +66,7 @@
bash 'Tweak apc.ini file' do
cwd php_conf[1] # module ini files
code <<-EOH
grep -q -e 'apc.stat=0' apc.ini || echo "apc.stat=0" >> apc.ini
grep -q -e 'apc.stat=0' #{apc_config} || echo "apc.stat=0" >> #{apc_config}
EOH
end

Expand Down

0 comments on commit e1d7b8e

Please sign in to comment.