From 7c084c7cab30c38f1a7604e279b6937d01abed9b Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Wed, 11 Sep 2019 17:43:36 +1000 Subject: [PATCH] DEV: allow USR2 to restart unicorn in dev Well all this does is amends a commit comment cause I was over eager and pushed previous commit. This is the comment I wanted.... This allows `pkill -USR2 -f 'ruby bin/unicorn'` to restart current unicorn It is handy if you want to bind a keyboard shortcut for unicorn restarts in dev. By doing so you can avoid finding the terminal, hitting ctrl-c and then hitting up, enter, heading back to browser. It saves time. Automate stuff, you will not regret it... --- bin/unicorn | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/unicorn b/bin/unicorn index 01b90020bca..865e8d87dce 100755 --- a/bin/unicorn +++ b/bin/unicorn @@ -50,10 +50,9 @@ if ARGV.include?("--help") exit end -# this dev_mode hackery enables, the following script to be used to restart unicorn: +# this dev_mode hackery enables, the following to be used to restart unicorn: # -# #!/usr/bin/env bash -# kill -s USR2 `ps aux | grep ruby\ bin\/unicorn | grep -v grep | awk '{print $2}'` +# pkill -USR2 -f 'ruby bin/unicorn' # # This is handy if you want to bind a key to restarting unicorn in dev