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.7 lib/tasks/unicorn.erb
daddy-0.3.6 lib/tasks/unicorn.erb
daddy-0.3.4 lib/tasks/unicorn.erb
daddy-0.3.3 lib/tasks/unicorn.erb
daddy-0.3.2 lib/tasks/unicorn.erb
daddy-0.3.1 lib/tasks/unicorn.erb
daddy-0.3.0 lib/tasks/unicorn.erb
daddy-0.2.23 lib/tasks/unicorn.erb
daddy-0.2.22 lib/tasks/unicorn.erb
daddy-0.2.21 lib/tasks/unicorn.erb
daddy-0.2.20 lib/tasks/unicorn.erb
daddy-0.2.19 lib/tasks/unicorn.erb
daddy-0.2.18 lib/tasks/unicorn.erb
daddy-0.2.17 lib/tasks/unicorn.erb
daddy-0.2.16 lib/tasks/unicorn.erb
daddy-0.2.15 lib/tasks/unicorn.erb
daddy-0.2.14 lib/tasks/unicorn.erb
daddy-0.2.13 lib/tasks/unicorn.erb
daddy-0.2.12 lib/tasks/unicorn.erb
daddy-0.2.11 lib/tasks/unicorn.erb