Sha256: 9f1d725c9fddae3c1f0d29295ec8f8587566c6404f29e86f2fc3c347f14a1eae

Contents?: true

Size: 661 Bytes

Versions: 74

Compression:

Stored size: 661 Bytes

Contents

#!/bin/sh
#
# chkconfig: - 85 15
# description: unicorn

. /etc/rc.d/init.d/functions

RAILS_USER=<%= ENV['USER'] %>
RAILS_ENV=<%= ENV['RAILS_ENV'] %>
RAILS_ROOT=<%= ENV['RAILS_ROOT'] %>

PID=${RAILS_ROOT}/tmp/pids/unicorn.pid
CONFIG=${RAILS_ROOT}/config/unicorn.rb

export PATH="${PATH}":/usr/local/bin

start() {
  daemon --user=${RAILS_USER} --pidfile=$PID bundle exec unicorn_rails -c ${CONFIG} -E ${RAILS_ENV} -D
}

stop() {
  killproc -p ${PID} -QUIT
}

cd ${RAILS_ROOT} || exit 1

case $1 in

  start)
    start
    ;;
  stop)
    stop
    ;;
  restart)
    stop
    start
    ;;
  *)
    echo >&2 "Usage: $0 <start|stop|restart>"
    exit 1
    ;;
esac

Version data entries

74 entries across 74 versions & 1 rubygems

Version Path
daddy-0.3.27 lib/tasks/unicorn/unicorn.erb
daddy-0.3.26 lib/tasks/unicorn/unicorn.erb
daddy-0.3.25 lib/tasks/unicorn/unicorn.erb
daddy-0.3.24 lib/tasks/unicorn/unicorn.erb
daddy-0.3.23 lib/tasks/unicorn/unicorn.erb
daddy-0.3.22 lib/tasks/unicorn/unicorn.erb
daddy-0.3.21 lib/tasks/unicorn/unicorn.erb
daddy-0.3.20 lib/tasks/unicorn.erb
daddy-0.3.19 lib/tasks/unicorn.erb
daddy-0.3.18 lib/tasks/unicorn.erb
daddy-0.3.17 lib/tasks/unicorn.erb
daddy-0.3.16 lib/tasks/unicorn.erb
daddy-0.3.15 lib/tasks/unicorn.erb
daddy-0.3.14 lib/tasks/unicorn.erb
daddy-0.3.13 lib/tasks/unicorn.erb
daddy-0.3.12 lib/tasks/unicorn.erb
daddy-0.3.11 lib/tasks/unicorn.erb
daddy-0.3.10 lib/tasks/unicorn.erb
daddy-0.3.9 lib/tasks/unicorn.erb
daddy-0.3.8 lib/tasks/unicorn.erb