FIX: `unicorn_launcher` should shut down unicorn gracefully.

This commit is contained in:
Guo Xiang Tan 2018-10-03 14:26:11 +08:00
parent 2912170e9e
commit 4b367dc61e
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ function on_reload()
sleep 10 sleep 10
curl $LOCAL_WEB &> /dev/null curl $LOCAL_WEB &> /dev/null
NEW_UNICORN_PID=`ps -f --ppid $UNICORN_PID | grep unicorn | grep -v worker | awk '{ print $2 }'` NEW_UNICORN_PID=`ps -f --ppid $UNICORN_PID | grep unicorn | grep -v worker | awk '{ print $2 }'`
kill $UNICORN_PID kill -s QUIT $UNICORN_PID
echo "Old pid is: $UNICORN_PID New pid is: $NEW_UNICORN_PID" echo "Old pid is: $UNICORN_PID New pid is: $NEW_UNICORN_PID"
UNICORN_PID=$NEW_UNICORN_PID UNICORN_PID=$NEW_UNICORN_PID
} }