Don't try and restart passenger on machines that don't have it
authorTom Hughes <tom@compton.nu>
Fri, 6 Jul 2018 08:16:31 +0000 (09:16 +0100)
committerTom Hughes <tom@compton.nu>
Fri, 6 Jul 2018 08:16:31 +0000 (09:16 +0100)
cookbooks/web/resources/rails_port.rb

index ca3fd8c..778d24f 100644 (file)
@@ -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"