Sha256: aaa7d04f345968b335b84dc6760fe516d2d8c566a1860c8f00cb8730bcf62297
Contents?: true
Size: 577 Bytes
Versions: 4
Compression:
Stored size: 577 Bytes
Contents
#!/bin/bash export HOME=<%= deploy_to %> source <%= deploy_to %>/.rvm/scripts/rvm export RAILS_ENV=<%= rails_env %> WORKER="$1" && shift QUEUE="$1" && shift PIDFILE=<%= pid_path %>/resque.${WORKER}.pid CMD="bundle exec 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
4 entries across 4 versions & 1 rubygems