reopen logs on usr1
This commit is contained in:
parent
56a0a40175
commit
de7888cd97
|
@ -23,10 +23,18 @@ function on_reload()
|
||||||
UNICORN_PID=$NEW_UNICORN_PID
|
UNICORN_PID=$NEW_UNICORN_PID
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function on_reopenlogs()
|
||||||
|
{
|
||||||
|
|
||||||
|
echo "Reopening logs"
|
||||||
|
kill -s USR1 $UNICORN_PID
|
||||||
|
}
|
||||||
|
|
||||||
export UNICORN_SUPERVISOR_PID=$$
|
export UNICORN_SUPERVISOR_PID=$$
|
||||||
|
|
||||||
trap on_exit EXIT
|
trap on_exit EXIT
|
||||||
trap on_reload USR2 HUP
|
trap on_reload USR2 HUP
|
||||||
|
trap on_reopenlogs USR1
|
||||||
|
|
||||||
unicorn $@ &
|
unicorn $@ &
|
||||||
UNICORN_PID=$!
|
UNICORN_PID=$!
|
||||||
|
|
Loading…
Reference in New Issue