mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 01:42:04 +08:00
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
|
||||
}
|
||||
|
||||
function on_reopenlogs()
|
||||
{
|
||||
|
||||
echo "Reopening logs"
|
||||
kill -s USR1 $UNICORN_PID
|
||||
}
|
||||
|
||||
export UNICORN_SUPERVISOR_PID=$$
|
||||
|
||||
trap on_exit EXIT
|
||||
trap on_reload USR2 HUP
|
||||
trap on_reopenlogs USR1
|
||||
|
||||
unicorn $@ &
|
||||
UNICORN_PID=$!
|
||||
|
|
Loading…
Reference in New Issue
Block a user