Added environment variables to control bot behaviour

This commit is contained in:
John Edwards 2023-10-01 14:57:11 +01:00
parent 9ca9832d89
commit 99b24290bb
2 changed files with 19 additions and 1 deletions

View file

@ -1,11 +1,25 @@
#!/bin/bash
mkdir -p "${STEAMAPPDIR}" || true
# Download Updates
bash "${STEAMCMDDIR}/steamcmd.sh" +force_install_dir "${STEAMAPPDIR}" \
+login "${STEAMUSER}" "${STEAMPASS}" \
+app_update "${STEAMAPPID}" \
+quit
# Rewrite Config Files
if [[ ! -z $CS2_BOT_DIFFICULTY ]] ; then
sed -i "s/bot_difficulty.*/bot_difficulty ${CS2_BOT_DIFFICULTY}/" /home/steam/cs2-dedicated/game/csgo/cfg/*
fi
if [[ ! -z $CS2_BOT_QUOTA ]] ; then
sed -i "s/bot_quota.*/bot_quota ${CS2_BOT_QUOTA}/" /home/steam/cs2-dedicated/game/csgo/cfg/*
fi
if [[ ! -z $CS2_BOT_QUOTA_MODE ]] ; then
sed -i "s/bot_quota_mode.*/bot_quota_mode ${CS2_BOT_QUOTA_MODE}/" /home/steam/cs2-dedicated/game/csgo/cfg/*
fi
# Start Server
"${STEAMAPPDIR}/game/bin/linuxsteamrt64/cs2" -dedicated \
-usercon \