|
|
|
@ -1,10 +1,16 @@
|
|
|
|
|
#!/bin/bash
|
|
|
|
|
mkdir -p "${STEAMAPPDIR}" || true
|
|
|
|
|
|
|
|
|
|
if [[ "$STEAMAPPVALIDATE" -eq 1 ]]; then
|
|
|
|
|
VALIDATE="validate"
|
|
|
|
|
else
|
|
|
|
|
VALIDATE=""
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Download Updates
|
|
|
|
|
bash "${STEAMCMDDIR}/steamcmd.sh" +force_install_dir "${STEAMAPPDIR}" \
|
|
|
|
|
+login anonymous \
|
|
|
|
|
+app_update "${STEAMAPPID}" \
|
|
|
|
|
+app_update "${STEAMAPPID}" "${VALIDATE}" \
|
|
|
|
|
+quit
|
|
|
|
|
|
|
|
|
|
# steamclient.so fix
|
|
|
|
@ -40,13 +46,13 @@ fi
|
|
|
|
|
|
|
|
|
|
# Rewrite Config Files
|
|
|
|
|
if [[ ! -z $CS2_BOT_DIFFICULTY ]] ; then
|
|
|
|
|
sed -i "s/bot_difficulty.*/bot_difficulty ${CS2_BOT_DIFFICULTY}/" "${STEAMAPPDIR}"/game/csgo/cfg/*
|
|
|
|
|
sed -r -i "s/^(bot_difficulty) .*/\1 ${CS2_BOT_DIFFICULTY}/" "${STEAMAPPDIR}"/game/csgo/cfg/*
|
|
|
|
|
fi
|
|
|
|
|
if [[ ! -z $CS2_BOT_QUOTA ]] ; then
|
|
|
|
|
sed -i "s/bot_quota.*/bot_quota ${CS2_BOT_QUOTA}/" "${STEAMAPPDIR}"/game/csgo/cfg/*
|
|
|
|
|
sed -r -i "s/^(bot_quota) .*/\1 ${CS2_BOT_QUOTA}/" "${STEAMAPPDIR}"/game/csgo/cfg/*
|
|
|
|
|
fi
|
|
|
|
|
if [[ ! -z $CS2_BOT_QUOTA_MODE ]] ; then
|
|
|
|
|
sed -i "s/bot_quota_mode.*/bot_quota_mode ${CS2_BOT_QUOTA_MODE}/" "${STEAMAPPDIR}"/game/csgo/cfg/*
|
|
|
|
|
sed -r -i "s/^(bot_quota_mode) .*/\1 ${CS2_BOT_QUOTA_MODE}/" "${STEAMAPPDIR}"/game/csgo/cfg/*
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Switch to server directory
|
|
|
|
|