killbill-memoizeit
Changes
bin/db-helper 21(+14 -7)
server/pom.xml 107(+107 -0)
server/src/deb/control/changelog 5(+5 -0)
server/src/deb/control/compat 1(+1 -0)
server/src/deb/control/config 26(+26 -0)
server/src/deb/control/control 22(+22 -0)
server/src/deb/control/copyright 27(+27 -0)
server/src/deb/control/postinst 64(+64 -0)
server/src/deb/control/postrm 33(+33 -0)
server/src/deb/control/prerm 8(+8 -0)
server/src/deb/control/rules 8(+8 -0)
server/src/deb/control/templates 38(+38 -0)
server/src/deb/control/watch 3(+3 -0)
server/src/deb/README.adoc 28(+28 -0)
server/src/deb/support/killbill.properties 43(+43 -0)
server/src/deb/support/killbill.sh 20(+20 -0)
server/src/deb/support/logback.xml 36(+36 -0)
Details
bin/db-helper 21(+14 -7)
diff --git a/bin/db-helper b/bin/db-helper
index 5a8d82a..d995243 100755
--- a/bin/db-helper
+++ b/bin/db-helper
@@ -31,6 +31,7 @@ DATABASE="killbill"
USER="root"
PWD="root"
TEST_ALSO=
+OUTPUT_FILE=
DDL_FILE=
CLEAN_FILE=
@@ -45,7 +46,8 @@ function usage() {
echo -n " -u user_name (default = root)"
echo -n " -p password (default = root)"
echo -n " -t (also include test ddl)"
- echo -n "-h this message"
+ echo -n " -f file (output file, for dump only)"
+ echo -n " -h this message"
echo
exit 1
}
@@ -61,7 +63,7 @@ function find_test_ddl() {
local cur_ddl=
for m in $modules; do
- cur_ddl=`find $m/src/test/resources/ -name ddl_test.sql 2>/dev/null`
+ cur_ddl=`find $TOP/$m/src/test/resources/ -name ddl_test.sql 2>/dev/null`
ddl_test="$ddl_test $cur_ddl"
done
echo "$ddl_test"
@@ -74,7 +76,7 @@ function find_src_ddl() {
local cur_ddl=
for m in $modules; do
- cur_ddl=`find $m/src/main/resources/ -name ddl.sql 2>/dev/null`
+ cur_ddl=`find $TOP/$m/src/main/resources/ -name ddl.sql 2>/dev/null`
ddl_src="$ddl_src $cur_ddl"
done
echo "$ddl_src"
@@ -118,13 +120,14 @@ function cleanup() {
}
-while getopts ":a:d:u:pt" options; do
+while getopts ":a:d:u:p:f:t" options; do
case $options in
a ) ACTION=$OPTARG;;
d ) DATABASE=$OPTARG;;
u ) USER=$OPTARG;;
p ) PWD=$OPTARG;;
t ) TEST_ALSO=1;;
+ f ) OUTPUT_FILE=$OPTARG;;
h ) usage;;
* ) usage;;
esac
@@ -133,14 +136,18 @@ done
if [ -z $ACTION ]; then
- echo "Need to specify an action <CREATE|CLEAN>"
+ echo "Need to specify an action <CREATE|CLEAN|DUMP>"
usage
fi
if [ $ACTION == "dump" ]; then
- DDL_FILE=`create_ddl_file`
- cat $DDL_FILE
+ DDL_FILE=`create_ddl_file`
+ if [ -z $OUTPUT_FILE ]; then
+ cat $DDL_FILE
+ else
+ cat $DDL_FILE > $OUTPUT_FILE
+ fi
fi
if [ $ACTION == "create" ]; then
server/pom.xml 107(+107 -0)
diff --git a/server/pom.xml b/server/pom.xml
index 3640145..0657503 100644
--- a/server/pom.xml
+++ b/server/pom.xml
@@ -394,4 +394,111 @@
</plugin>
</plugins>
</build>
+ <profiles>
+ <profile>
+ <id>debian</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>1.2.1</version>
+ <executions>
+ <execution>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <executable>${project.basedir}/../bin/db-helper</executable>
+ <arguments>
+ <argument>-a dump</argument>
+ <argument>-f ${project.build.directory}/killbill.ddl.sql</argument>
+ </arguments>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.vafer</groupId>
+ <artifactId>jdeb</artifactId>
+ <version>1.0.2-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>jdeb</goal>
+ </goals>
+ <configuration>
+ <dataSet>
+ <!-- Ubuntu specific files -->
+ <data>
+ <src>${project.basedir}/src/deb/control/killbill-server.default</src>
+ <type>file</type>
+ <dst>/etc/default/killbill-server</dst>
+ </data>
+ <data>
+ <src>${project.basedir}/src/deb/control/killbill-server.upstart</src>
+ <type>file</type>
+ <dst>/etc/init/killbill-server.conf</dst>
+ </data>
+ <data>
+ <src>${project.basedir}/src/deb/control/copyright</src>
+ <type>file</type>
+ <dst>/usr/share/doc/killbill/copyright</dst>
+ </data>
+ <!-- TODO /usr/share/doc/changelog.Debian.gz -->
+ <data>
+ <type>template</type>
+ <!-- Make sure to list all of them here so they are properly deleted on package removal -->
+ <paths>
+ <path>/etc/killbill</path>
+ <path>/var/run/killbill</path>
+ <path>/usr/share/killbill</path>
+ <path>/var/lib/killbill</path>
+ <path>/var/log/killbill</path>
+ </paths>
+ </data>
+
+ <!-- Kill Bill specific files -->
+ <data>
+ <src>
+ ${project.build.directory}/${project.name}-${project.version}-jetty-console.war
+ </src>
+ <type>file</type>
+ <dst>/usr/share/killbill/${project.name}-standalone.war</dst>
+ </data>
+ <data>
+ <src>${project.basedir}/src/deb/support/killbill.sh</src>
+ <type>file</type>
+ <dst>/usr/bin/${project.name}</dst>
+ <mapper>
+ <type>perm</type>
+ <filemode>0755</filemode>
+ </mapper>
+ </data>
+ <data>
+ <src>${project.basedir}/src/deb/support/logback.xml</src>
+ <type>file</type>
+ <dst>/etc/killbill/logback.xml</dst>
+ </data>
+ <data>
+ <src>${project.basedir}/src/deb/support/killbill.properties</src>
+ <type>file</type>
+ <dst>/etc/killbill/${project.name}.properties</dst>
+ </data>
+ <data>
+ <src>${project.build.directory}/killbill.ddl.sql</src>
+ <type>file</type>
+ <dst>/usr/share/killbill/${project.name}.ddl.sql</dst>
+ </data>
+ </dataSet>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
server/src/deb/control/changelog 5(+5 -0)
diff --git a/server/src/deb/control/changelog b/server/src/deb/control/changelog
new file mode 100644
index 0000000..8481a9a
--- /dev/null
+++ b/server/src/deb/control/changelog
@@ -0,0 +1,5 @@
+killbill (0.6.15-0ubuntu1) precise; urgency=low
+
+ * Initial release
+
+ -- Pierre-Alexandre Meyer <pierre@kill-bill.org> Fri, 27 Sep 2013 01:35:21 +0000
server/src/deb/control/compat 1(+1 -0)
diff --git a/server/src/deb/control/compat b/server/src/deb/control/compat
new file mode 100644
index 0000000..45a4fb7
--- /dev/null
+++ b/server/src/deb/control/compat
@@ -0,0 +1 @@
+8
server/src/deb/control/config 26(+26 -0)
diff --git a/server/src/deb/control/config b/server/src/deb/control/config
new file mode 100755
index 0000000..becf7d7
--- /dev/null
+++ b/server/src/deb/control/config
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+set -e
+
+default() {
+ KILLBILL_PROPERTIES=/etc/killbill/killbill-server.properties
+ [ -f $KILLBILL_PROPERTIES ] && cat $KILLBILL_PROPERTIES | grep -v ^# | grep $1 | cut -d'=' -f2 | tail -1
+}
+
+. /usr/share/debconf/confmodule
+
+# TODO Respect previous values on upgrades when default file is installed
+db_input medium killbill/username || true
+db_input medium killbill/groupname || true
+
+# Set default values for Kill Bill configuration
+db_set killbill/dburl "$(default com.ning.jetty.jdbi.url)"
+db_set killbill/dbusername "$(default com.ning.jetty.jdbi.user)"
+db_set killbill/dbpassword "$(default com.ning.jetty.jdbi.password)"
+
+db_input medium killbill/dburl || true
+db_input medium killbill/dbusername || true
+db_input medium killbill/dbpassword || true
+
+db_input medium killbill/ddl || true
+db_go || true
server/src/deb/control/control 22(+22 -0)
diff --git a/server/src/deb/control/control b/server/src/deb/control/control
new file mode 100644
index 0000000..97f4355
--- /dev/null
+++ b/server/src/deb/control/control
@@ -0,0 +1,22 @@
+Package: [[name]]
+Version: [[version]]
+Source: killbill
+Section: java
+Priority: extra
+Maintainer: Pierre-Alexandre Meyer <pierre@kill-bill.org>
+Build-Depends: debhelper (>= 8.0.0), default-jdk (>= 1:1.6)
+Standards-Version: 3.9.2
+Homepage: http://kill-bill.org
+Vcs-Git: https://github.com/killbill/killbill.git
+Vcs-Browser: https://github.com/killbill/killbill
+Architecture: all
+Depends: default-jdk (>= 1:1.6)
+Description: Open Billing Platform
+ Kill Bill sits at the center of your business. It understands
+ your catalog and manages customer purchases and plan changes
+ (upgrades, downgrades and cancellations). It knows what plans
+ a customer has subscribed to and can provide that information
+ to other systems, including your product. It creates invoices
+ on a regular basis, triggers payments against your payment
+ providers (PayPal, Credit Card Gateway etc.) and can produce
+ finance reports and business analytics.
server/src/deb/control/copyright 27(+27 -0)
diff --git a/server/src/deb/control/copyright b/server/src/deb/control/copyright
new file mode 100644
index 0000000..c1e9c60
--- /dev/null
+++ b/server/src/deb/control/copyright
@@ -0,0 +1,27 @@
+Format: http://dep.debian.net/deps/dep5
+Upstream-Name: killbill
+Source: https://github.com/killbill/killbill
+
+Files: *
+Copyright: (C) 2009-2013 Ning Inc., and authors
+License: Apache-2.0
+
+Files: debian/*
+Copyright: 2013 Pierre-Alexandre Meyer <pierre@kill-bill.org>
+License: Apache-2.0
+
+License: Apache-2.0
+ Licensed 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.
+ .
+ On Debian systems, the complete text of the Apache version 2.0 license
+ can be found in "/usr/share/common-licenses/Apache-2.0".
diff --git a/server/src/deb/control/killbill-server.default b/server/src/deb/control/killbill-server.default
new file mode 100644
index 0000000..de4761c
--- /dev/null
+++ b/server/src/deb/control/killbill-server.default
@@ -0,0 +1,16 @@
+NAME=killbill-server
+
+JAVA=/usr/bin/java
+
+PIDFILE=/var/run/killbill/killbill-server.pid
+
+KILLBILL_USER=killbill
+KILLBILL_ROOT=/usr/share/killbill
+KILLBILL_WAR=/usr/share/killbill/$NAME-standalone.war
+KILLBILL_HOME=/var/lib/killbill
+KILLBILL_RUN=/var/run/killbill
+KILLBILL_LOG_DIR=/var/log/killbill
+KILLBILL_LOG=$KILLBILL_LOG_DIR/killbill/$NAME.log
+KILLBILL_PROPERTIES_FILE=$NAME.properties
+KILLBILL_PROPERTIES=/etc/killbill/$KILLBILL_PROPERTIES_FILE
+KILLBILL_START=/usr/bin/$NAME
diff --git a/server/src/deb/control/killbill-server.upstart b/server/src/deb/control/killbill-server.upstart
new file mode 100644
index 0000000..c5cfcaa
--- /dev/null
+++ b/server/src/deb/control/killbill-server.upstart
@@ -0,0 +1,18 @@
+description "Kill Bill Open Billing Platform"
+author "Pierre-Alexandre Meyer <pierre@kill-bill.org>"
+
+start on runlevel [2345]
+stop on runlevel [!2345]
+
+pre-start script
+ [ -r /etc/default/killbill-server ] && . /etc/default/killbill-server
+ test -f $KILLBILL_WAR || { stop ; exit 0; }
+ mkdir $KILLBILL_RUN > /dev/null 2>&1 || true
+ chown -R $KILLBILL_USER $KILLBILL_RUN || true
+end script
+
+script
+ [ -r /etc/default/killbill-server ] && . /etc/default/killbill-server
+ export KILLBILL_HOME
+ exec start-stop-daemon --start -c $KILLBILL_USER --exec $KILLBILL_START --name $NAME
+end script
server/src/deb/control/postinst 64(+64 -0)
diff --git a/server/src/deb/control/postinst b/server/src/deb/control/postinst
new file mode 100755
index 0000000..ecc1f1a
--- /dev/null
+++ b/server/src/deb/control/postinst
@@ -0,0 +1,64 @@
+#!/bin/sh
+
+set -e
+
+. /etc/default/killbill-server
+
+set_property() {
+ db_get $2 && VALUE="$RET" || VALUE=
+ # Escape for sed
+ VALUE=$(echo $VALUE | sed -e 's/[\/&]/\\&/g')
+ if [ -f $KILLBILL_PROPERTIES ] && [ -n $VALUE ]; then
+ TMPDIR=${TMPDIR-$(mktemp -d)}
+ TMP_KILLBILL_PROPERTIES=$TMPDIR/$KILLBILL_PROPERTIES_FILE
+ mkdir -p $TMPDIR && \
+ sed -e "s/^$1=.*/$1=$VALUE/" \
+ < $KILLBILL_PROPERTIES > $TMP_KILLBILL_PROPERTIES && \
+ mv -f $TMP_KILLBILL_PROPERTIES $KILLBILL_PROPERTIES && \
+ rmdir $TMPDIR
+ fi
+}
+
+. /usr/share/debconf/confmodule
+
+db_get killbill/username && KILLBILL_USER="$RET" || KILLBILL_USER="killbill"
+db_get killbill/groupname && KILLBILL_GROUP="$RET" || KILLBILL_GROUP="killbill"
+
+case "$1" in
+ configure)
+ # Create killbill user if it doesn't exist.
+ if ! id ${KILLBILL_USER} > /dev/null 2>&1 ; then
+ adduser --system --home ${KILLBILL_HOME} --no-create-home \
+ --group --disabled-password --quiet --shell /bin/bash \
+ ${KILLBILL_USER}
+ fi
+ # Create killbill group if it doesn't exist.
+ if ! getent group ${KILLBILL_GROUP} > /dev/null 2>&1 ; then
+ addgroup --system --quiet ${KILLBILL_GROUP}
+ usermod -g ${KILLBILL_GROUP} ${KILLBILL_USER} > /dev/null 2>&1
+ fi
+ # Fix directory permissions
+ chown -R ${KILLBILL_USER}:${KILLBILL_GROUP} ${KILLBILL_LOG_DIR} || true
+ chown -R ${KILLBILL_USER}:${KILLBILL_GROUP} ${KILLBILL_HOME} || true
+
+ # Configure Kill Bill properties (see config script)
+ set_property com.ning.jetty.jdbi.url killbill/dburl
+ set_property com.ning.jetty.jdbi.user killbill/dbusername
+ set_property com.ning.jetty.jdbi.password killbill/dbpassword
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
server/src/deb/control/postrm 33(+33 -0)
diff --git a/server/src/deb/control/postrm b/server/src/deb/control/postrm
new file mode 100755
index 0000000..d8a4751
--- /dev/null
+++ b/server/src/deb/control/postrm
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+db_get killbill/username && KILLBILL_USER="$RET" || KILLBILL_USER="killbill"
+db_get killbill/groupname && KILLBILL_GROUP="$RET" || KILLBILL_GROUP="killbill"
+
+# /etc/default/killbill-server has been deleted already
+KILLBILL_LOG_DIR=/var/log/killbill
+
+case "$1" in
+ purge)
+ # Remove killbill user and group
+ userdel ${KILLBILL_USER} || true
+ # Remove log files (see http://www.debian.org/doc/debian-policy/ch-files.html)
+ rm -rf ${KILLBILL_LOG_DIR} || true
+ # Remove my changes to the debconf db
+ db_purge
+ ;;
+ remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
server/src/deb/control/prerm 8(+8 -0)
diff --git a/server/src/deb/control/prerm b/server/src/deb/control/prerm
new file mode 100644
index 0000000..560708d
--- /dev/null
+++ b/server/src/deb/control/prerm
@@ -0,0 +1,8 @@
+#!/bin/sh
+set -e
+
+# Automatically added by dh_installinit
+if [ -e "/etc/init/killbill-server.conf" ]; then
+ invoke-rc.d killbill-server stop || exit $?
+fi
+# End automatically added section
server/src/deb/control/rules 8(+8 -0)
diff --git a/server/src/deb/control/rules b/server/src/deb/control/rules
new file mode 100755
index 0000000..218df65
--- /dev/null
+++ b/server/src/deb/control/rules
@@ -0,0 +1,8 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+%:
+ dh $@
server/src/deb/control/templates 38(+38 -0)
diff --git a/server/src/deb/control/templates b/server/src/deb/control/templates
new file mode 100644
index 0000000..f303cc0
--- /dev/null
+++ b/server/src/deb/control/templates
@@ -0,0 +1,38 @@
+Template: killbill/username
+Type: string
+Default: killbill
+Description: Dedicated system account for the killbill server:
+ The killbill server must use a dedicated account for its operation so that
+ the system's security is not compromised by running it with superuser
+ privileges.
+
+Template: killbill/groupname
+Type: string
+Default: killbill
+Description: Dedicated system group for the killbill server:
+ The killbill server must use a dedicated group for its operation so that
+ the system's security is not compromised by running it with superuser
+ privileges.
+
+Template: killbill/dburl
+Type: string
+Default: jdbc:mysql://127.0.0.1:3306/killbill
+Description: Database host and port:
+ JDBC url to your database
+
+Template: killbill/dbusername
+Type: string
+Default: root
+Description: Database username:
+ Username to use to connect to your database
+
+Template: killbill/dbpassword
+Type: password
+Default:
+Description: Database password:
+ Password to use to connect to your database
+
+Template: killbill/ddl
+Type: text
+Description: Don't forget to setup your database:
+ Tables and indexes to be created can be found in /usr/share/killbill/killbill-server.ddl.sql
server/src/deb/control/watch 3(+3 -0)
diff --git a/server/src/deb/control/watch b/server/src/deb/control/watch
new file mode 100644
index 0000000..420c7e1
--- /dev/null
+++ b/server/src/deb/control/watch
@@ -0,0 +1,3 @@
+version=3
+opts=dversionmangle=s/\+dfsg// \
+ https://github.com/killbill/killbill/tags .*/killbill-(\d+).(\d+).(\d+).tar.gz debian
server/src/deb/README.adoc 28(+28 -0)
diff --git a/server/src/deb/README.adoc b/server/src/deb/README.adoc
new file mode 100644
index 0000000..df7c799
--- /dev/null
+++ b/server/src/deb/README.adoc
@@ -0,0 +1,28 @@
+= killbill-server Debian package
+
+== Installation
+
+ sudo DEBIAN_PRIORITY=medium dpkg -i killbill-server_*.deb
+
+After installation, make sure to setup your database with the DDL provided at `/usr/share/killbill/killbill-server.ddl.sql`.
+
+Configuration files are available at `/etc/killbill/`.
+
+== Usage
+
+ sudo service killbill-server status
+ sudo service killbill-server start
+ sudo service killbill-server stop
+
+Logs can be found in `/var/log/killbill/killbill-server.log` (*logback*) and `/var/log/upstart/killbill-server.log` (*STDOUT* and *STDERR*).
+
+== Removal
+
+ sudo dpkg -r killbill-server
+
+will delete all binaries and configuration files.
+
+
+ sudo dpkg --purge killbill-server
+
+will also delete the killbill user and group, as well as clear the debconf database. */var/log/killbill/* will be kept.
server/src/deb/support/killbill.properties 43(+43 -0)
diff --git a/server/src/deb/support/killbill.properties b/server/src/deb/support/killbill.properties
new file mode 100644
index 0000000..86cc5da
--- /dev/null
+++ b/server/src/deb/support/killbill.properties
@@ -0,0 +1,43 @@
+#
+# Copyright 2010-2013 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.
+#
+
+logback.configurationFile=/etc/killbill/logback.xml
+
+# Use skeleton properties for server and configure killbill database
+com.ning.jetty.jdbi.url=jdbc:mysql://127.0.0.1:3306/killbill
+com.ning.jetty.jdbi.user=root
+com.ning.jetty.jdbi.password=root
+
+# Use the SpyCarAdvanced.xml catalog
+killbill.catalog.uri=SpyCarAdvanced.xml
+
+# Set default timezone to UTC
+user.timezone=UTC
+
+# For bundles that use antlr (string template)
+ANTLR_USE_DIRECT_CLASS_LOADING=true
+
+killbill.billing.notificationq.main.sleep=100
+
+killbill.billing.persistent.bus.main.sleep=100
+killbill.billing.persistent.bus.main.nbThreads=1
+killbill.billing.persistent.bus.main.claimed=1
+
+killbill.billing.persistent.bus.external.sleep=100
+killbill.billing.persistent.bus.external.nbThreads=1
+killbill.billing.persistent.bus.external.claimed=1
+killbill.billing.persistent.bus.external.tableName=bus_ext_events
+killbill.billing.persistent.bus.external.historyTableName=bus_ext_events_history
server/src/deb/support/killbill.sh 20(+20 -0)
diff --git a/server/src/deb/support/killbill.sh b/server/src/deb/support/killbill.sh
new file mode 100644
index 0000000..a162ed6
--- /dev/null
+++ b/server/src/deb/support/killbill.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+
+[ -r /etc/default/killbill-server ] && . /etc/default/killbill-server
+
+JAVA=${JAVA-"`which java`"}
+
+JAVA_PROPERTIES=${JAVA_PROPERTIES-"-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=12345 -Xms512m -Xmx1024m -XX:MaxPermSize=512m -XX:MaxDirectMemorySize=512m -XX:+UseConcMarkSweepGC"}
+
+build_properties() {
+ local opts=
+ local prop=
+ for prop in `cat $KILLBILL_PROPERTIES | grep =`; do
+ local k=`echo $prop | awk ' BEGIN {FS="="} { print $1 }'`
+ local v=`echo $prop | awk 'BEGIN {FS="="} { print $2 }'`
+ opts="$opts -D$k=$v"
+ done
+ echo $opts
+}
+
+$JAVA $JAVA_PROPERTIES `build_properties` -jar $KILLBILL_WAR
server/src/deb/support/logback.xml 36(+36 -0)
diff --git a/server/src/deb/support/logback.xml b/server/src/deb/support/logback.xml
new file mode 100644
index 0000000..74c1ea2
--- /dev/null
+++ b/server/src/deb/support/logback.xml
@@ -0,0 +1,36 @@
+<!--
+ ~ Copyright 2010-2013 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.
+ -->
+
+<configuration>
+ <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>/var/log/killbill/killbill-server.log</file>
+ <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <!-- daily rollover -->
+ <fileNamePattern>killbill-server.%d{yyyy-MM-dd}.log</fileNamePattern>
+
+ <!-- keep 30 days' worth of history -->
+ <maxHistory>30</maxHistory>
+ </rollingPolicy>
+
+ <encoder>
+ <pattern>%-4relative [%thread] %-5level %logger{35} - %msg%n</pattern>
+ </encoder>
+ </appender>
+
+ <root level="info">
+ <appender-ref ref="FILE" />
+ </root>
+</configuration>