From de7888cd974a2e61df0f1c680af6e837af438cc7 Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 25 Aug 2014 10:48:48 +1000 Subject: [PATCH] reopen logs on usr1 --- config/unicorn_launcher | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/unicorn_launcher b/config/unicorn_launcher index 96c0e68a1e5..035ec047810 100755 --- a/config/unicorn_launcher +++ b/config/unicorn_launcher @@ -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=$!