X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/1c848471a16f9d1ee1fc8a327af110447ea1ef4c..0eb2a2b70464e53cd52edcee3b2fa96ac8bc416b:/cookbooks/web/templates/default/passenger.cron.erb diff --git a/cookbooks/web/templates/default/passenger.cron.erb b/cookbooks/web/templates/default/passenger.cron.erb index b4d78fd96..d3cef76ee 100644 --- a/cookbooks/web/templates/default/passenger.cron.erb +++ b/cookbooks/web/templates/default/passenger.cron.erb @@ -4,13 +4,13 @@ pgrep -u rails -f Rack | sort > /tmp/rails.actual.$$ # Get a list of rack processes we expect to be running -passenger-status | awk '/PID:/ { print $3 }' | sort > /tmp/rails.expected.$$ +PASSENGER_INSTANCE_REGISTRY_DIR=<%= node[:passenger][:instance_registry_dir] %> passenger-status | awk '/PID:/ { print $3 }' | sort > /tmp/rails.expected.$$ # Get a list of unexpected rack processes 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.$$