From 7007a32e4f0133e7b33435746b19aa9c4de10985 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 26 Feb 2017 10:19:09 +0000 Subject: [PATCH] Remove some no longer needed code for old Ubuntu versions --- cookbooks/donate/recipes/default.rb | 24 +++++++----------------- cookbooks/nodejs/recipes/default.rb | 3 +-- cookbooks/nominatim/recipes/default.rb | 14 +++----------- cookbooks/planet/recipes/default.rb | 6 +----- 4 files changed, 12 insertions(+), 35 deletions(-) diff --git a/cookbooks/donate/recipes/default.rb b/cookbooks/donate/recipes/default.rb index d1b431bd7..89eb26d57 100644 --- a/cookbooks/donate/recipes/default.rb +++ b/cookbooks/donate/recipes/default.rb @@ -21,23 +21,13 @@ include_recipe "apache" include_recipe "mysql" include_recipe "git" -if node[:lsb][:release].to_f >= 16.04 - package "php" - package "php-cli" - package "php-curl" - package "php-mysql" - package "php-gd" - - apache_module "php7.0" -else - package "php5" - package "php5-cli" - package "php5-curl" - package "php5-mysql" - package "php5-gd" - - apache_module "php5" -end +package "php" +package "php-cli" +package "php-curl" +package "php-mysql" +package "php-gd" + +apache_module "php7.0" apache_module "headers" diff --git a/cookbooks/nodejs/recipes/default.rb b/cookbooks/nodejs/recipes/default.rb index f6f054fe0..7e2b844e6 100644 --- a/cookbooks/nodejs/recipes/default.rb +++ b/cookbooks/nodejs/recipes/default.rb @@ -18,8 +18,7 @@ # package "nodejs" +package "nodejs-legacy" package "npm" package "g++" package "make" - -package "nodejs-legacy" if node[:lsb][:release].to_f >= 14.04 diff --git a/cookbooks/nominatim/recipes/default.rb b/cookbooks/nominatim/recipes/default.rb index ac1b27f33..5dedfd4e7 100644 --- a/cookbooks/nominatim/recipes/default.rb +++ b/cookbooks/nominatim/recipes/default.rb @@ -307,27 +307,19 @@ apache_module "proxy_fcgi" apache_module "proxy_http" apache_module "headers" -service "php5-fpm" do - if node[:lsb][:release].to_f >= 15.10 - provider Chef::Provider::Service::Systemd - service_name "php7.0-fpm" - elsif node[:lsb][:release].to_f >= 14.04 - provider Chef::Provider::Service::Upstart - end +service "php7.0-fpm" do action [:enable, :start] supports :status => true, :restart => true, :reload => true end -php_confdir = node[:lsb][:release].to_f >= 15.10 ? "/etc/php/7.0" : "/etc/php5" - node[:nominatim][:fpm_pools].each do |name, data| - template "#{php_confdir}/fpm/pool.d/#{name}.conf" do + template "/etc/php/7.0/fpm/pool.d/#{name}.conf" do source "fpm.conf.erb" owner "root" group "root" mode 0o644 variables data.merge(:name => name) - notifies :reload, "service[php5-fpm]" + notifies :reload, "service[php7.0-fpm]" end end diff --git a/cookbooks/planet/recipes/default.rb b/cookbooks/planet/recipes/default.rb index 33c01751b..5d4e063cd 100644 --- a/cookbooks/planet/recipes/default.rb +++ b/cookbooks/planet/recipes/default.rb @@ -23,11 +23,7 @@ package "perl" package "pbzip2" package "osmosis" -if node[:lsb][:release].to_f >= 16.04 - package "php-cli" -else - package "php5-cli" -end +package "php-cli" file "/etc/cron.d/planet" do action :delete -- 2.39.5