Skip to content

Commit

Permalink
Use node[platform_family] to improve platforms support
Browse files Browse the repository at this point in the history
  • Loading branch information
zuazo committed Sep 17, 2015
1 parent 843fcb4 commit 1e2ede8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@

dbtype = node['owncloud']['config']['dbtype']

case node['platform']
when 'debian', 'ubuntu'
case node['platform_family']
when 'debian'
# Sync apt package index
include_recipe 'apt'

php_pkgs = %w(php5-gd php5-intl php5-curl php5-json smbclient)
php_pkgs << 'php5-sqlite' if dbtype == 'sqlite'
php_pkgs << 'php5-mysql' if dbtype == 'mysql'
php_pkgs << 'php5-pgsql' if dbtype == 'pgsql'
when 'redhat', 'centos'
if node['platform_version'].to_f < 6
when 'rhel'
if node['platform'] != 'amazon' && node['platform_version'].to_f < 6
php_pkgs = %w(php53-gd php53-mbstring php53-xml php53-intl samba-client)
php_pkgs << 'php53-mysql' if dbtype == 'mysql'
php_pkgs << 'php53-pgsql' if dbtype == 'pgsql'
Expand All @@ -49,7 +49,7 @@
php_pkgs << 'php-mysql' if dbtype == 'mysql'
php_pkgs << 'php-pgsql' if dbtype == 'pgsql'
end
when 'fedora', 'scientific', 'amazon'
when 'fedora'
php_pkgs = %w(php-gd php-mbstring php-xml php-intl samba-client)
php_pkgs << 'php-pdo' if dbtype == 'sqlite'
php_pkgs << 'php-mysql' if dbtype == 'mysql'
Expand Down

0 comments on commit 1e2ede8

Please sign in to comment.