2024-06-25 08:07:02 -06:00
|
|
|
#!/bin/bash
|
|
|
|
cd /home/container || exit 1
|
|
|
|
|
2024-06-25 08:44:08 -06:00
|
|
|
# Enable loopback interface
|
|
|
|
ip link set lo up
|
|
|
|
|
2024-06-25 08:07:02 -06:00
|
|
|
# Configure colors
|
|
|
|
CYAN='\033[0;36m'
|
|
|
|
RESET_COLOR='\033[0m'
|
|
|
|
|
|
|
|
# Print Current Java Version
|
|
|
|
java -version
|
|
|
|
|
|
|
|
# Set environment variable that holds the Internal Docker IP
|
|
|
|
INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}')
|
|
|
|
export INTERNAL_IP
|
|
|
|
|
|
|
|
# Replace Startup Variables
|
2024-06-25 08:27:33 -06:00
|
|
|
MODIFIED_STARTUP=$(echo -e "${STARTUP}" | sed -e 's/{{/${/g' -e 's/}}/}/g')
|
2024-06-25 08:07:02 -06:00
|
|
|
echo -e "${CYAN}STARTUP /home/container: ${MODIFIED_STARTUP} ${RESET_COLOR}"
|
|
|
|
|
|
|
|
# Run the Server
|
2024-06-25 08:27:33 -06:00
|
|
|
eval "${MODIFIED_STARTUP}"
|