Skip to content

Instantly share code, notes, and snippets.

@tachesimazzoca
Last active October 11, 2015 17:07
Show Gist options
  • Save tachesimazzoca/3891036 to your computer and use it in GitHub Desktop.
Save tachesimazzoca/3891036 to your computer and use it in GitHub Desktop.
Makefile for Unicorn #ruby
PID = /path/to/unicorn.pid
all:
@echo Usage: (start|stop|restart|graceful)
start:
@bundle exec unicorn -c config/unicorn.rb -D
stop:
@[[ -s "$(PID)" ]] && kill -QUIT `cat $(PID)`
restart:
@[[ -s "$(PID)" ]] && kill -HUP `cat $(PID)`
graceful:
@[[ -s "$(PID)" ]] && kill -USR2 `cat $(PID)`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment