Sha256: 4d136dd8d5760c5dc9abfa08bc946b051592dcc3564b4bb2017f19803acdc9df

Contents?: true

Size: 649 Bytes

Versions: 12

Compression:

Stored size: 649 Bytes

Contents

#!/bin/bash
export HOME=<%= deploy_to %>
export RAILS_ENV=<%= rails_env rescue "production" %>

if [[ -e "${HOME}"/.rvm/scripts/rvm ]]; then
  source "${HOME}"/.rvm/scripts/rvm
fi

PIDFILE=<%= thin_pidfile %>
CMD="<%= ruby_exec_prefix %> thin -p <%= thin_port %> -e $RAILS_ENV -d -R config.ru start"

cd <%= current_path %> >/dev/null

sig () {
  test -s "$PIDFILE" && kill -$1 $(<$PIDFILE)
}

case $1 in
start)
  sig 0 && echo >&2 "Already running" && exit 0
  $CMD
  ;;
stop)
  sig QUIT && exit 0
  echo >&2 "Not running"
  ;;
kill)
  sig TERM && exit 0
  echo >&2 "Not running"
  ;;
*)
  echo >&2 "Usage: $0 <start|stop|kill>"
  exit 1
  ;;
esac

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
capper-2.0.0 lib/capper/templates/thin.sh.erb
capper-2.0.0.rc3 lib/capper/templates/thin.sh.erb
capper-2.0.0.rc2 lib/capper/templates/thin.sh.erb
capper-2.0.0.rc1 lib/capper/templates/thin.sh.erb
capper-2.0.0.pre3 lib/capper/templates/thin.sh.erb
capper-2.0.0.pre2 lib/capper/templates/thin.sh.erb
capper-2.0.0.pre1 lib/capper/templates/thin.sh.erb
capper-1.2.4 lib/capper/templates/thin.sh.erb
capper-1.2.3 lib/capper/templates/thin.sh.erb
capper-1.2.2 lib/capper/templates/thin.sh.erb
capper-1.2.1 lib/capper/templates/thin.sh.erb
capper-1.2.0 lib/capper/templates/thin.sh.erb