FreeBSD rc script

Eric Wong normalperson at
Mon Dec 7 04:50:27 EST 2009

John-Paul Bader <hukl at> wrote:
> Hey Eric,
> would you be interested in including a FreeBSD rc.d script ? Here is
> what my current one looks like:

Hi Paul,

Sure, a few comments below.

> command=/usr/local/bin/unicorn_rails
> command_args="-c /usr/local/etc/unicorn.rb -E production -D"


> extra_commands=reload
> sig_reload=USR2


> This loads unicorn at startup, gives the usual start stop and restart
> commands and has a reload command which sends USR2 to the master
> process.

Since it's using a Unicorn config file with USR2, wouldn't it have to
use QUIT to complete the actual upgrade?

Not too knowledgeable with FreeBSD init scripts on my end here,
but I'm guessing at how it'd work:

	extra_commands="reexec graceful reload"


Eric Wong

More information about the mongrel-unicorn mailing list