From 005a8fb7bda2388959cbb3b130183d41fb2804c0 Mon Sep 17 00:00:00 2001 From: Lovinoes Date: Wed, 21 Aug 2024 01:39:33 +0200 Subject: [PATCH] Create entrypoint.sh --- java-shenandoah/entrypoint.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 java-shenandoah/entrypoint.sh diff --git a/java-shenandoah/entrypoint.sh b/java-shenandoah/entrypoint.sh new file mode 100644 index 0000000..76cd8f4 --- /dev/null +++ b/java-shenandoah/entrypoint.sh @@ -0,0 +1,18 @@ +#!/bin/bash +cd /home/container || exit 1 + +CYAN='\033[0;36m' +RESET_COLOR='\033[0m' + +java -version + +INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') +export INTERNAL_IP + +# Replace Startup Variables +# shellcheck disable=SC2086 +MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') +echo -e "${CYAN}STARTUP /home/container: ${MODIFIED_STARTUP} ${RESET_COLOR}" + +# shellcheck disable=SC2086 +eval ${MODIFIED_STARTUP}