From: Tom Hughes Date: Fri, 6 Jul 2018 08:16:31 +0000 (+0100) Subject: Don't try and restart passenger on machines that don't have it X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/bf16c782a9d8e78c4b14a35b899b81992f91155f Don't try and restart passenger on machines that don't have it --- diff --git a/cookbooks/web/resources/rails_port.rb b/cookbooks/web/resources/rails_port.rb index ca3fd8c06..778d24ff4 100644 --- a/cookbooks/web/resources/rails_port.rb +++ b/cookbooks/web/resources/rails_port.rb @@ -334,7 +334,9 @@ action :create do action :nothing end - passenger_application rails_directory + passenger_application rails_directory do + only_if { ::File.exist?("/usr/bin/passenger-config") } + end template "/etc/cron.daily/rails-#{new_resource.site.tr('.', '-')}" do cookbook "web"