From ffd116669dc97ff53fa41f60bbee08d7818a184d Mon Sep 17 00:00:00 2001 From: Victor Costa Date: Fri, 17 Apr 2015 09:54:24 -0300 Subject: [PATCH] Fix production script --- script/production | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/script/production b/script/production index 4380f2d..89a85f2 100755 --- a/script/production +++ b/script/production @@ -55,7 +55,7 @@ do_restart() { environments_loop start clear_cache - ruby -S bundle exec thin -C config/thin.yml restart --onebyone + RUBY_GC_MALLOC_LIMIT=250000000 RUBY_HEAP_MIN_SLOTS=800000 RUBY_FREE_MIN=32768 ruby -S bundle exec thin -C config/thin.yml restart --onebyone } stop_via_pid_file() { @@ -85,7 +85,9 @@ environments_loop() { } do_running() { - pgrep -u noosfero -f 'thin server' > /dev/null + pids=$(sed "s/.*/& /" tmp/pids/thin.*.pid | tr -d '\n' 2>/dev/null || true) + # passes if any of $pids exist, fails otherwise + kill -0 $pids > /dev/null 2>&1 } case "$ACTION" in -- libgit2 0.21.2