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 ca3fd8c065c18cdd6aaddea6033ce8507ff79a42..778d24ff4927d6b112b0e80f36abbb14f60d07b9 100644 (file)
@@ -334,7 +334,9 @@ action :create do
     action :nothing
   end
 
     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"
 
   template "/etc/cron.daily/rails-#{new_resource.site.tr('.', '-')}" do
     cookbook "web"