Skip to content

Commit ecad3bf

Browse files
authored
Merge pull request #478 from jmtd/clean-up-run-script
Clean up run script
2 parents d9035d2 + bef862d commit ecad3bf

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

modules/run/artifacts/opt/jboss/container/java/run/run-env.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

modules/run/artifacts/opt/jboss/container/java/run/run-java.sh

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
# Fail on a single failed command
44
set -eo pipefail
55

6+
export JBOSS_CONTAINER_UTIL_LOGGING_MODULE="${JBOSS_CONTAINER_UTIL_LOGGING_MODULE-/opt/jboss/container/util/logging}"
7+
export JBOSS_CONTAINER_JAVA_RUN_MODULE="${JBOSS_CONTAINER_JAVA_RUN_MODULE-/opt/jboss/container/java/run}"
8+
9+
# Default the application dir to the S2I deployment dir
10+
if [ -z "$JAVA_APP_DIR" ]
11+
then JAVA_APP_DIR=/deployments
12+
fi
13+
614
source "$JBOSS_CONTAINER_UTIL_LOGGING_MODULE/logging.sh"
715

816
# ==========================================================
@@ -93,15 +101,10 @@ load_env() {
93101

94102
# Check also $JAVA_APP_DIR. Overrides other defaults
95103
# It's valid to set the app dir in the default script
96-
if [ -z "${JAVA_APP_DIR}" ]; then
97-
# XXX: is this correct? This is defaulted above to /deployments. Should we
98-
# define a default to the old /opt/java-run?
99-
JAVA_APP_DIR="${JBOSS_CONTAINER_JAVA_RUN_MODULE}"
100-
else
101-
if [ -f "${JAVA_APP_DIR}/${run_env_sh}" ]; then
104+
if [ -f "${JAVA_APP_DIR}/${run_env_sh}" ]; then
102105
source "${JAVA_APP_DIR}/${run_env_sh}"
103-
fi
104106
fi
107+
105108
export JAVA_APP_DIR
106109

107110
# JAVA_LIB_DIR defaults to JAVA_APP_DIR

0 commit comments

Comments
 (0)