]> git.openstreetmap.org Git - chef.git/commitdiff
Use PHP 7.2 for Nominatim on 18.04
authorTom Hughes <tom@compton.nu>
Fri, 10 Aug 2018 12:21:19 +0000 (13:21 +0100)
committerTom Hughes <tom@compton.nu>
Fri, 10 Aug 2018 12:21:19 +0000 (13:21 +0100)
cookbooks/nominatim/recipes/default.rb

index 128bb34cf99b92d73e0ecd61173f7ab62a032397..f424061affff9f7182e2b60083bdb8bb5030fcc4 100644 (file)
@@ -327,19 +327,25 @@ apache_module "proxy_fcgi"
 apache_module "proxy_http"
 apache_module "headers"
 
-service "php7.0-fpm" do
+php_version = if node[:lsb][:release].to_f >= 18.04
+                "7.2"
+              else
+                "7.0"
+              end
+
+service "php#{php_version}-fpm" do
   action [:enable, :start]
   supports :status => true, :restart => true, :reload => true
 end
 
 node[:nominatim][:fpm_pools].each do |name, data|
-  template "/etc/php/7.0/fpm/pool.d/#{name}.conf" do
+  template "/etc/php/#{php_version}/fpm/pool.d/#{name}.conf" do
     source "fpm.conf.erb"
     owner "root"
     group "root"
     mode 0o644
     variables data.merge(:name => name)
-    notifies :reload, "service[php7.0-fpm]"
+    notifies :reload, "service[php#{php_version}-fpm]"
   end
 end