Add support for steamcmd app validation
parent
23a8b46500
commit
d1f8732586
|
@ -11,6 +11,7 @@ LABEL maintainer="astra@zio.sh"
|
||||||
ENV STEAMAPPID 730
|
ENV STEAMAPPID 730
|
||||||
ENV STEAMAPP cs2
|
ENV STEAMAPP cs2
|
||||||
ENV STEAMAPPDIR "${HOMEDIR}/${STEAMAPP}-dedicated"
|
ENV STEAMAPPDIR "${HOMEDIR}/${STEAMAPP}-dedicated"
|
||||||
|
ENV STEAMAPPVALIDATE 0
|
||||||
|
|
||||||
COPY etc/entry.sh "${HOMEDIR}/entry.sh"
|
COPY etc/entry.sh "${HOMEDIR}/entry.sh"
|
||||||
COPY etc/server.cfg "/etc/server.cfg"
|
COPY etc/server.cfg "/etc/server.cfg"
|
||||||
|
|
|
@ -1,10 +1,16 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
mkdir -p "${STEAMAPPDIR}" || true
|
mkdir -p "${STEAMAPPDIR}" || true
|
||||||
|
|
||||||
|
if [[ "$STEAMAPPVALIDATE" -eq 1 ]]; then
|
||||||
|
VALIDATE="validate"
|
||||||
|
else
|
||||||
|
VALIDATE=""
|
||||||
|
fi
|
||||||
|
|
||||||
# Download Updates
|
# Download Updates
|
||||||
bash "${STEAMCMDDIR}/steamcmd.sh" +force_install_dir "${STEAMAPPDIR}" \
|
bash "${STEAMCMDDIR}/steamcmd.sh" +force_install_dir "${STEAMAPPDIR}" \
|
||||||
+login anonymous \
|
+login anonymous \
|
||||||
+app_update "${STEAMAPPID}" \
|
+app_update "${STEAMAPPID}" "${VALIDATE}" \
|
||||||
+quit
|
+quit
|
||||||
|
|
||||||
# steamclient.so fix
|
# steamclient.so fix
|
||||||
|
@ -40,13 +46,13 @@ fi
|
||||||
|
|
||||||
# Rewrite Config Files
|
# Rewrite Config Files
|
||||||
if [[ ! -z $CS2_BOT_DIFFICULTY ]] ; then
|
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
|
fi
|
||||||
if [[ ! -z $CS2_BOT_QUOTA ]] ; then
|
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
|
fi
|
||||||
if [[ ! -z $CS2_BOT_QUOTA_MODE ]] ; then
|
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
|
fi
|
||||||
|
|
||||||
# Switch to server directory
|
# Switch to server directory
|
||||||
|
|
Loading…
Reference in New Issue