Skip to content

Instantly share code, notes, and snippets.

@hukl
Created November 2, 2009 14:34
Show Gist options
  • Save hukl/224191 to your computer and use it in GitHub Desktop.
Save hukl/224191 to your computer and use it in GitHub Desktop.
#!/bin/sh
#
# PROVIDE: cccms
# REQUIRE: nginx cleanvar
. /etc/rc.subr
name=cccms
rcvar=`set_rcvar`
command=/usr/local/bin/unicorn_rails
command_args="-c /usr/local/etc/unicorn.rb -E production -D"
: ${cccms_dir=/usr/local/www/cccms}
pidfile=${cccms_pidfile:-/usr/local/www/cccms/tmp/pids/unicorn.pid}
procname=ruby18
cccms_chdir=${cccms_dir}
required_dirs=${cccms_dir}
extra_commands=reload
sig_reload=USR2
load_rc_config ${name}
run_rc_command $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment