Sha256: 6880fb119abbfeabb7d777dc041de8fe510dcec89989b681d4397420212c4208
Contents?: true
Size: 616 Bytes
Versions: 27
Compression:
Stored size: 616 Bytes
Contents
#!/bin/bash export HOME=<%= deploy_to %> export RAILS_ENV=<%= rails_env %> if [[ -e "${HOME}"/.rvm/scripts/rvm ]]; then source "${HOME}"/.rvm/scripts/rvm fi WORKER="$1" && shift QUEUE="$1" && shift PIDFILE=<%= pid_path %>/resque.${WORKER}.pid CMD="<%= rake %> environment resque:work QUEUE=${QUEUE} PIDFILE=${PIDFILE}" cd <%= current_path %> >/dev/null sig () { test -s "$PIDFILE" && kill -$1 $(<$PIDFILE) } case $1 in start) sig 0 && echo >&2 "Already running" && exit 0 exec $CMD ;; stop) sig TERM && exit 0 echo >&2 "Not running" ;; *) echo >&2 "Usage: $0 <start|stop>" exit 1 ;; esac
Version data entries
27 entries across 27 versions & 1 rubygems