#!/bin/bash
JAVA_ARGS="-Djava.net.preferIPv6Addresses=false -Dfile.encoding=UTF-8 -Xms${APP_XMS:-1G} -Xmx${APP_XMX:-1G} -DLOG_LEVEL=${LOG_LEVEL:-ERROR}"

if [ $DEBUG_PORT ]
then
JAVA_ARGS="$JAVA_ARGS -agentlib:jdwp=transport=dt_socket,server=y,address=$DEBUG_PORT,suspend=${SUSPEND:-n} "
fi

exec /usr/local/java8/bin/java $JAVA_ARGS -Dport=${QLOUD_HTTP_PORT} -Dwar=/usr/share/fake-bs-proxy/fake-bs-proxy-rest.war -DcontextPath=/ -jar /usr/share/jetty/jetty-starter.jar
