From 66d40fe4552057cdac72cc4c20a73fe041eb2586 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Mon, 9 Oct 2017 23:06:35 -0500 Subject: [PATCH] add support for getting internal IP Pterodactyl/Panel#613 --- entrypoint.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index b1d4319..a7437bb 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,16 +1,14 @@ #!/bin/ash -sleep 5 +sleep 2 cd /home/container +# Make internal Docker IP address available to processes. +export INTERNAL_IP=`ip route get 1 | awk '{print $NF;exit}'` + # Replace Startup Variables MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')` echo ":/home/container$ ${MODIFIED_STARTUP}" # Run the Server ${MODIFIED_STARTUP} - -if [ $? -ne 0 ]; then - echo "PTDL_CONTAINER_ERR: There was an error while attempting to run the start command." - exit 1 -fi