Don't error if passenger isn't running when we restart the web site
authorTom Hughes <tom@compton.nu>
Sun, 1 Jul 2018 17:48:50 +0000 (18:48 +0100)
committerTom Hughes <tom@compton.nu>
Sun, 1 Jul 2018 17:48:50 +0000 (18:48 +0100)
cookbooks/web/resources/rails_port.rb

index 70c334e..8da12cc 100644 (file)
@@ -336,7 +336,7 @@ action :create do
 
   execute rails_directory do
     action :nothing
-    command "passenger-config restart-app --ignore-app-not-running #{rails_directory}"
+    command "passenger-config restart-app --ignore-app-not-running --ignore-passenger-not-running #{rails_directory}"
     user "root"
     group "root"
     only_if { ::File.exist?("/usr/bin/passenger-config") }
@@ -355,7 +355,7 @@ end
 action :restart do
   execute rails_directory do
     action :run
-    command "passenger-config restart-app --ignore-app-not-running #{rails_directory}"
+    command "passenger-config restart-app --ignore-app-not-running --ignore-passenger-not-running #{rails_directory}"
     user "root"
     group "root"
   end