- log "exiting"
- }
- function on_reload_unicorn() {
- log "Reloading unicorn ($UNICORN_PID)"
- kill -s USR2 $UNICORN_PID
- unset NEW_UNICORN_PID
- count=0
- while [ "$count" -lt 180 -a -z "$NEW_UNICORN_PID" ]; do
- NEW_UNICORN_PID=$(pgrep -f -P $UNICORN_PID "unicorn master")