mirror of
https://github.com/gwenhael-le-moine/ledgerrb.git
synced 2024-11-17 07:48:59 +01:00
setup rackcup
This commit is contained in:
parent
3701d936b1
commit
0a211fe876
1 changed files with 4 additions and 2 deletions
|
@ -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() {
|
||||||
|
|
Loading…
Reference in a new issue