Permalink
Browse files

Use unicorn if available

  • Loading branch information...
1 parent 3468292 commit ad93a6a55d8290743e5d113ac89e780e6dd56da5 David Genord II committed Feb 13, 2012
Showing with 14 additions and 1 deletion.
  1. +14 −1 aliases
View
15 aliases
@@ -68,7 +68,20 @@ function sr {
fi
}
function ss {
- if [ -f './script/rails' ]; then
+ if [ -f './config/unicorn.rb' ]; then
+ echo "$*" | grep -E "(^| )-p " > /dev/null 2>&1
+ if [ $? != 1 ]; then
+ PORT=""
+ else
+ PORT="-p 3000"
+ fi
+
+ if [ -f './script/rails' ]; then
+ bundle exec unicorn_rails $PORT $*
+ else
+ bundle exec unicorn $PORT $*
+ fi
+ elif [ -f './script/rails' ]; then
./script/rails server $*
elif [ -f './script/server' ]; then
./script/server $*

0 comments on commit ad93a6a

Please sign in to comment.