add support for internal IP access

ref Pterodactyl/Panel#613
This commit is contained in:
Dane Everitt 2017-10-09 23:02:06 -05:00
parent b95b8af243
commit 1ba1130a28
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53

View File

@ -3,14 +3,12 @@ sleep 5
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