Permalink
Switch branches/tags
killbill-0.20.2 killbill-0.20.1 killbill-0.20.0 killbill-0.19.19 killbill-0.19.18 killbill-0.19.17 killbill-0.19.16 killbill-0.19.15 killbill-0.19.14 killbill-0.19.13 killbill-0.19.12 killbill-0.19.11 killbill-0.19.10 killbill-0.19.9 killbill-0.19.8 killbill-0.19.7 killbill-0.19.6 killbill-0.19.5 killbill-0.19.4 killbill-0.19.3 killbill-0.19.2 killbill-0.19.1 killbill-0.19.0 killbill-0.18.22 killbill-0.18.21 killbill-0.18.20 killbill-0.18.19 killbill-0.18.18 killbill-0.18.17 killbill-0.18.16 killbill-0.18.15 killbill-0.18.14 killbill-0.18.13 killbill-0.18.12 killbill-0.18.11 killbill-0.18.10 killbill-0.18.9 killbill-0.18.8 killbill-0.18.7 killbill-0.18.6 killbill-0.18.5 killbill-0.18.4 killbill-0.18.3 killbill-0.18.2 killbill-0.18.1 killbill-0.18.0 killbill-0.17.8 killbill-0.17.7 killbill-0.17.6 killbill-0.17.5 killbill-0.17.4 killbill-0.17.3 killbill-0.17.2.4 killbill-0.17.2.3 killbill-0.17.2.2 killbill-0.17.2.1 killbill-0.17.2 killbill-0.17.1 killbill-0.17.0 killbill-0.16.12 killbill-0.16.11 killbill-0.16.10 killbill-0.16.9 killbill-0.16.8 killbill-0.16.7 killbill-0.16.6 killbill-0.16.5 killbill-0.16.4 killbill-0.16.3 killbill-0.16.2 killbill-0.16.1 killbill-0.16.0 killbill-0.15.10 killbill-0.15.9 killbill-0.15.8 killbill-0.15.7 killbill-0.15.6 killbill-0.15.5 killbill-0.15.4 killbill-0.15.3 killbill-0.15.2 killbill-0.15.1 killbill-0.15.0 killbill-0.14.1 killbill-0.14.0 killbill-0.13.7 killbill-0.13.6 killbill-0.13.5 killbill-0.13.4 killbill-0.13.3 killbill-0.13.2 killbill-0.13.1 killbill-0.12.1 killbill-0.12.0 killbill-0.11.13 killbill-0.11.12 killbill-0.11.11 killbill-0.11.10 killbill-0.11.9 killbill-0.11.8
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 100 lines (81 sloc) 3.66 KB
#! /usr/bin/env bash
###################################################################################
# #
# Copyright 2010-2011 Ning, Inc. #
# #
# Ning licenses this file to you under the Apache License, version 2.0 #
# (the "License"); you may not use this file except in compliance with the #
# License. You may obtain a copy of the License at: #
# #
# http://www.apache.org/licenses/LICENSE-2.0 #
# #
# Unless required by applicable law or agreed to in writing, software #
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
# License for the specific language governing permissions and limitations #
# under the License. #
# #
###################################################################################
HERE=`cd \`dirname $0\`; pwd`
TOP=$HERE/..
# Assume killbill profile by default for now
SERVER=$TOP/profiles/killbill
PROPERTIES=${PROPERTIES-"$SERVER/src/main/resources/killbill-server.properties"}
DEBUG_OPTS_ECLIPSE=" -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=12345 "
DEBUG_OPTS_ECLIPSE_WAIT=" -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=12345 "
# Default JVM settings if unset
MAVEN_OPTS=${MAVEN_OPTS-"-Duser.timezone=GMT -Dorg.killbill.server.http.gzip=true -Xms512m -Xmx1024m -XX:MaxPermSize=512m -XX:MaxDirectMemorySize=512m -XX:+UseConcMarkSweepGC"}
LOG="$SERVER/src/main/resources/logback.xml"
LOG_DIR="$SERVER/logs"
HOSTNAME=`hostname`
# From Argument Options
PORT=8080
JMX_PORT=8989
START=
DEBUG=
WAIT_DEBUGGER=
function usage() {
echo -n "./start-server "
echo -n " -s (start server)"
echo -n " -d (debugger turned on)"
echo -n " -w (along with -d, wait for debugger before starting)"
echo -n " -p <port_number> default 8080"
echo -n " -j <jmx port_number> default 8989"
echo -n " -l <log_dir> default $SERVER/logs"
echo -n "-h this message"
exit 1
}
function start() {
mkdir -p $LOG_DIR
local start_cmd="mvn -Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true -Dorg.killbill.server.properties=file://$PROPERTIES -Dlogback.configurationFile=$LOG jetty:run"
local debug_opts_eclipse=
if [ ! -z $DEBUG ]; then
if [ ! -z $WAIT_DEBUGGER ]; then
debug_opts_eclipse=$DEBUG_OPTS_ECLIPSE_WAIT
else
debug_opts_eclipse=$DEBUG_OPTS_ECLIPSE
fi
fi
export MAVEN_OPTS="$MAVEN_OPTS $debug_opts_eclipse -Dorg.killbill.queue.creator.name="$HOSTNAME-"$PORT -Djetty.port=$PORT -Dcom.sun.management.jmxremote.port=$JMX_PORT -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
echo "Starting IRS MAVEN_OPTS = $MAVEN_OPTS"
echo "$start_cmd"
cd $SERVER
$start_cmd
}
while getopts ":p:j:l:swdh" options; do
case $options in
s ) START=1;;
d ) DEBUG=1;;
w ) WAIT_DEBUGGER=1;;
p ) PORT=$OPTARG;;
j ) JMX_PORT=$OPTARG;;
l ) LOG_DIR=$OPTARG;;
h ) usage;;
* ) usage;;
esac
done
if [ ! -z $START ]; then
start
else
usage
fi