Skip to content

Instantly share code, notes, and snippets.

@yury
Created March 12, 2010 12:58
Show Gist options
  • Save yury/330275 to your computer and use it in GitHub Desktop.
Save yury/330275 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
if [[ -s /usr/local/rvm/scripts/rvm ]] ; then source /usr/local/rvm/scripts/rvm ; fi
FILE_NAME=`basename $0`
if [ "`echo $0 | cut -c1`" = "/" ]; then
RAILS_BIN=`dirname $0`
else
RAILS_BIN=`pwd`/`echo $0 | sed -e s/$FILE_NAME//`
fi
RAILS_ROOT=`dirname $RAILS_BIN`
echo $RAILS_ROOT
cd $RAILS_ROOT && $1 $2 $3 $4 $5 $6 $7 $8
exit 0
check process planet_unicorn
with pidfile /mnt/planet33/sources/web2/tmp/pids/unicorn.pid
start program = "/mnt/planet33/sources/web2/bin/rmonit unicorn_rails -D -E production -c config/unicorn.rb"
stop program = "/bin/kill `cat /mnt/planet33/sources/web2/tmp/pids/unicorn.pid`"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment