Sha256: 9945c821ad36ca1b2aff96039cfd666169aaa11d5dc8e7a2b42b373765cc3b89

Contents?: true

Size: 843 Bytes

Versions: 11

Compression:

Stored size: 843 Bytes

Contents

#!/bin/bash -e

shift # get rid of unicorn argument

export PATH="/data/zendesk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
export UNICORN_PID=<%= File.join(node[:project_dir], node[:run_dir], "unicorn.pid") %>
export HOME="<%= node[:home_dir] %>"
rhome="<%= node[:release_dir] %>/service/unicorn"

case $1 in
  start*)
    unset LS_COLORS
    unset BUNDLE_GEMFILE GEM_PATH GEM_HOME RUBYOPT

    cd $rhome
    exec ./run
    ;;

  stop*)
    [[ -f $UNICORN_PID ]] && kill -TERM $(cat $UNICORN_PID)
    ;;

  reload*)
    [[ -f $UNICORN_PID ]] && kill -HUP $(cat $UNICORN_PID)
    ;;

  deploy*)
    [[ -f $UNICORN_PID ]] && kill -USR2 $(cat $UNICORN_PID)
    ;;

  logrotate*)
    [[ -f $UNICORN_PID ]] && kill -USR1 $(cat $UNICORN_PID)
    ;;

  *)
    echo 2>&1 "ERROR: unrecognized action : $1"
    exit 1
    ;;
esac

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
tvd-unicorn-0.0.17 cookbooks/unicorn/templates/default/server.erb
tvd-unicorn-0.0.16 cookbooks/unicorn/templates/default/server.erb
tvd-unicorn-0.0.15 cookbooks/unicorn/templates/default/server.erb
tvd-unicorn-0.0.14 cookbooks/unicorn/templates/default/server.erb
tvd-unicorn-0.0.13 cookbooks/unicorn/templates/default/server.erb
tvd-unicorn-0.0.12 cookbooks/unicorn/templates/default/server.erb
tvd-unicorn-0.0.11 cookbooks/unicorn/templates/default/server.erb
tvd-unicorn-0.0.10 cookbooks/unicorn/templates/default/server.erb
tvd-unicorn-0.0.9 cookbooks/unicorn/templates/default/server.erb
tvd-unicorn-0.0.8 cookbooks/unicorn/templates/default/server.erb
tvd-unicorn-0.0.7 cookbooks/unicorn/templates/default/server.erb