From f2eced6a5aa8766194842b5d262faaf1b3e3f334 Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Wed, 12 Jul 2023 04:42:22 +0200 Subject: [PATCH] rust: respect `AUTO_UPDATE` (#42) --- games/rust/entrypoint.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/games/rust/entrypoint.sh b/games/rust/entrypoint.sh index 16c6cab..9895369 100644 --- a/games/rust/entrypoint.sh +++ b/games/rust/entrypoint.sh @@ -4,8 +4,13 @@ cd /home/container # Make internal Docker IP address available to processes. export INTERNAL_IP=`ip route get 1 | awk '{print $(NF-2);exit}'` -# Update Rust Server -./steamcmd/steamcmd.sh +force_install_dir /home/container +login anonymous +app_update 258550 +quit + +## if auto_update is not set or to 1 update +if [ -z ${AUTO_UPDATE} ] || [ "${AUTO_UPDATE}" == "1" ]; then + ./steamcmd/steamcmd.sh +force_install_dir /home/container +login anonymous +app_update 258550 +quit +else + echo -e "Not updating game server as auto update was set to 0. Starting Server" +fi # Replace Startup Variables MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')`