Skip to content

Commit

Permalink
Update pillar shell script to pass JAVA_OPTS through to java executable
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris O'Meara committed Jul 16, 2016
1 parent 52ca6f1 commit 1fad31c
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/main/bash/pillar
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
#!/bin/bash

: ${JAVA_HOME:="/usr/java/default"}
: ${APP_ROOT:="."}
: ${PILLAR_ROOT:="/opt/pillar"}
: ${JAVA:=/usr/bin/java}
: ${PILLAR_ROOT:=/opt/pillar}

export JAVA_HOME APP_ROOT PILLAR_ROOT
export PILLAR_ROOT

CLASS=com.chrisomeara.pillar.cli.App
CLASS_PATH=${APP_ROOT}/conf:${APP_ROOT}/src/main/resources:${PILLAR_ROOT}/lib/pillar.jar:${PILLAR_ROOT}/conf
JAVA_OPTIONS="-Dlog4j.configuration=pillar-log4j.properties"
CLASS_PATH=${PILLAR_ROOT}/lib/pillar.jar:${PILLAR_ROOT}/conf
JAVA_OPTS="${JAVA_OPTS} -Dlog4j.configuration=pillar-log4j.properties"

$JAVA_HOME/bin/java -cp $CLASS_PATH $JAVA_OPTIONS $CLASS $*
$JAVA -cp $CLASS_PATH $JAVA_OPTS $CLASS $*

0 comments on commit 1fad31c

Please sign in to comment.