docker-images/entrypoint.sh
Michael (Parker) Parker 64ddf27920
Update entrypoint.sh
2018-08-18 22:17:39 -04:00

18 lines
530 B
Bash

#!/bin/bash
cd /home/container
sleep 1
# Make internal Docker IP address available to processes.
export INTERNAL_IP=`ip route get 1 | awk '{print $NF;exit}'`
# Update Source Server
if [ ! -z ${SRCDS_APPID} ]; then
./steamcmd/steamcmd.sh +login anonymous +force_install_dir /home/container +app_update ${SRCDS_APPID} +quit
fi
# Replace Startup Variables
MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')`
echo ":/home/container$ ${MODIFIED_STARTUP}"
# Run the Server
eval ${MODIFIED_STARTUP}