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.1.12 lib/tasks/unicorn.erb
daddy-0.1.11 lib/tasks/unicorn.erb
daddy-0.1.9 lib/tasks/unicorn.erb
daddy-0.1.8 lib/tasks/unicorn.erb
daddy-0.1.7 lib/tasks/unicorn.erb
daddy-0.1.6 lib/tasks/unicorn.erb
daddy-0.1.5 lib/tasks/unicorn.erb
daddy-0.1.4 lib/tasks/unicorn.erb
daddy-0.1.3 lib/tasks/unicorn.erb
daddy-0.1.2 lib/tasks/unicorn.erb
daddy-0.1.1 lib/tasks/unicorn.erb
daddy-0.1.0 lib/tasks/unicorn.erb
daddy-0.0.22 lib/tasks/unicorn.erb
daddy-0.0.21 lib/tasks/unicorn.erb