Ignore errors killing processes which may have already exited
authorTom Hughes <tom@compton.nu>
Mon, 9 Jun 2014 07:47:06 +0000 (08:47 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 9 Jun 2014 07:47:06 +0000 (08:47 +0100)
cookbooks/web/templates/default/passenger.cron.erb

index b4d78fd..086c413 100644 (file)
@@ -10,7 +10,7 @@ passenger-status | awk '/PID:/ { print $3 }' | sort > /tmp/rails.expected.$$
 pids=$(comm -23 /tmp/rails.actual.$$ /tmp/rails.expected.$$)
 
 # Kill any expected rack processes
-[ -n "$pids" ] && kill -9 $pids
+[ -n "$pids" ] && kill -9 $pids > /dev/null 2>&1
 
 # Remove our temporary files
 rm -f /tmp/rails.actual.$$ /tmp/rails.expected.$$