2021-09-28 16:08:27 +02:00
|
|
|
#!/bin/bash
|
|
|
|
cd /home/container
|
|
|
|
|
|
|
|
# Make internal Docker IP address available to processes.
|
|
|
|
export INTERNAL_IP=`ip route get 1 | awk '{print $NF;exit}'`
|
|
|
|
|
|
|
|
# Update Rust Server
|
2021-11-21 19:07:03 +01:00
|
|
|
./steamcmd/steamcmd.sh +force_install_dir /home/container +login anonymous +app_update 258550 +quit
|
2021-09-28 16:08:27 +02:00
|
|
|
|
2021-11-21 19:07:03 +01:00
|
|
|
# Replace Startup Variables
|
2021-09-28 16:08:27 +02:00
|
|
|
MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')`
|
|
|
|
echo ":/home/container$ ${MODIFIED_STARTUP}"
|
|
|
|
|
|
|
|
# OxideMod has been replaced with uMod
|
|
|
|
if [ -f OXIDE_FLAG ] || [ "${OXIDE}" = 1 ] || [ "${UMOD}" = 1 ]; then
|
|
|
|
echo "Updating uMod..."
|
|
|
|
curl -sSL "https://umod.org/games/rust/download/develop" > umod.zip
|
|
|
|
unzip -o -q umod.zip
|
|
|
|
rm umod.zip
|
|
|
|
echo "Done updating uMod!"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Fix for Rust not starting
|
|
|
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)
|
|
|
|
|
|
|
|
# Run the Server
|
|
|
|
node /wrapper.js "${MODIFIED_STARTUP}"
|