aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/bin
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/bin')
-rw-r--r--src/main/bin/start.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/main/bin/start.sh b/src/main/bin/start.sh
new file mode 100644
index 0000000..05b685e
--- /dev/null
+++ b/src/main/bin/start.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+APP_HOME="/opt/app/spike"
+
+if [ -z "$CONFIG_HOME" ]; then
+ echo "CONFIG_HOME must be set in order to start up process"
+ exit 1
+fi
+
+if [ -z "$SERVICE_BEANS" ]; then
+ echo "SERVICE_BEANS must be set in order to start up process"
+ exit 1
+fi
+
+if [ -z "$KEY_STORE_PASSWORD" ]; then
+ echo "KEY_STORE_PASSWORD must be set in order to start up process"
+ exit 1
+fi
+
+PROPS="-DAPP_HOME=$APP_HOME"
+PROPS="$PROPS -DCONFIG_HOME=$CONFIG_HOME"
+PROPS="$PROPS -Dlogging.config=$APP_HOME/bundleconfig/etc/logback.xml"
+PROPS="$PROPS -DKEY_STORE_PASSWORD=$KEY_STORE_PASSWORD"
+JVM_MAX_HEAP=${MAX_HEAP:-1024}
+
+set -x
+exec java -Xmx${JVM_MAX_HEAP}m $PROPS -jar ${APP_HOME}/spike.jar