This commit addresses two related issues:
- Sidekiq should shut down completely before we restart it;
- If we restart unicorn with USR2 we need to kill the old master and
worker processes.
The original init.d script uses a fixed username (e.g. git). Which is not flexible
when we using other user. So, I've updated it to use $APP_USER variable
instead and wrap it in a function to reduce repetitive codes.