Skip to content

Commit

Permalink
Merge pull request #478 from jmtd/clean-up-run-script
Browse files Browse the repository at this point in the history
Clean up run script
  • Loading branch information
jmtd authored Apr 10, 2024
2 parents d9035d2 + bef862d commit ecad3bf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
6 changes: 0 additions & 6 deletions modules/run/artifacts/opt/jboss/container/java/run/run-env.sh

This file was deleted.

17 changes: 10 additions & 7 deletions modules/run/artifacts/opt/jboss/container/java/run/run-java.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
# Fail on a single failed command
set -eo pipefail

export JBOSS_CONTAINER_UTIL_LOGGING_MODULE="${JBOSS_CONTAINER_UTIL_LOGGING_MODULE-/opt/jboss/container/util/logging}"
export JBOSS_CONTAINER_JAVA_RUN_MODULE="${JBOSS_CONTAINER_JAVA_RUN_MODULE-/opt/jboss/container/java/run}"

# Default the application dir to the S2I deployment dir
if [ -z "$JAVA_APP_DIR" ]
then JAVA_APP_DIR=/deployments
fi

source "$JBOSS_CONTAINER_UTIL_LOGGING_MODULE/logging.sh"

# ==========================================================
Expand Down Expand Up @@ -93,15 +101,10 @@ load_env() {

# Check also $JAVA_APP_DIR. Overrides other defaults
# It's valid to set the app dir in the default script
if [ -z "${JAVA_APP_DIR}" ]; then
# XXX: is this correct? This is defaulted above to /deployments. Should we
# define a default to the old /opt/java-run?
JAVA_APP_DIR="${JBOSS_CONTAINER_JAVA_RUN_MODULE}"
else
if [ -f "${JAVA_APP_DIR}/${run_env_sh}" ]; then
if [ -f "${JAVA_APP_DIR}/${run_env_sh}" ]; then
source "${JAVA_APP_DIR}/${run_env_sh}"
fi
fi

export JAVA_APP_DIR

# JAVA_LIB_DIR defaults to JAVA_APP_DIR
Expand Down

0 comments on commit ecad3bf

Please sign in to comment.