From 0a211fe8765ff1b1dd9004c9e76e3cff98707ce7 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Sun, 30 Aug 2015 22:41:46 +0200 Subject: [PATCH] setup rackcup --- rc.ledgerrb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rc.ledgerrb b/rc.ledgerrb index c7d19234..287260e0 100755 --- a/rc.ledgerrb +++ b/rc.ledgerrb @@ -2,15 +2,17 @@ CWD=$(pwd) +PIDFILE=./ledgerrb.pid +PORT=9292 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() { $SERVER $SERVER_OPTIONS } function stop() { - [ -e ./ledgerrb.pid ] && kill $(cat ./ledgerrb.pid) + [ -e $PIDFILE ] && kill $(cat $PIDFILE) } function restart() {