Sha256: f04038a86bb66216c7e49631fbee76e23d28447e5eac9b0a05f3057ebaf5eb43
Contents?: true
Size: 1.22 KB
Versions: 16
Compression:
Stored size: 1.22 KB
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 PIDFILE=<%= unicorn_pidfile %> CONFIG=<%= unicorn_config %> CMD="<%= ruby_exec_prefix %> unicorn -c $CONFIG -E $RAILS_ENV -D config.ru" 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" ;; reload) sig HUP && echo reloaded OK && exit 0 echo >&2 "Couldn't reload, starting '$CMD' instead" $CMD ;; upgrade) sig USR2 && exit 0 echo >&2 "Couldn't upgrade, starting '$CMD' instead" $CMD ;; addworker) sig TTIN && echo added one worker to the pool OK && exit 0 echo >&2 "Couldn't add worker" && exit 1 ;; delworker) sig TTOU && echo removed one worker from the pool OK && exit 0 echo >&2 "Couldn't remove worker" && exit 1 ;; logrotate) sig USR1 && echo rotated logs OK && exit 0 echo >&2 "Couldn't rotate logs" && exit 1 ;; *) echo >&2 "Usage: $0 <start|stop|kill|reload|upgrade|addworker|delworker|logrotate>" exit 1 ;; esac
Version data entries
16 entries across 16 versions & 1 rubygems