setup rackcup

This commit is contained in:
Gwenhael Le Moine 2015-08-30 22:41:46 +02:00
parent 3701d936b1
commit 0a211fe876

View file

@ -2,15 +2,17 @@
CWD=$(pwd) CWD=$(pwd)
PIDFILE=./ledgerrb.pid
PORT=9292
SERVER='bundle exec rackup' SERVER='bundle exec rackup'
SERVER_OPTIONS=' -D -P ./ledgerrb.pid' SERVER_OPTIONS=' --daemonize --pid $PIDFILE --port $PORT --host 0.0.0.0 --server puma'
function start() { function start() {
$SERVER $SERVER_OPTIONS $SERVER $SERVER_OPTIONS
} }
function stop() { function stop() {
[ -e ./ledgerrb.pid ] && kill $(cat ./ledgerrb.pid) [ -e $PIDFILE ] && kill $(cat $PIDFILE)
} }
function restart() { function restart() {