Add support for steamcmd app validation
This commit is contained in:
parent
f1ffd92eff
commit
d6cb895120
4 changed files with 17 additions and 1 deletions
|
@ -110,6 +110,14 @@ CS2_LOG_ITEMS=0 (Turns item logging on/off: 0=off, 1=on)
|
|||
|
||||
# Customizing this Container
|
||||
|
||||
## Validating Game Files
|
||||
|
||||
If you break the game through your customisations and want steamcmd to validate and redownload then set the `STEAMAPPVALIDATE` environment variable to `1`:
|
||||
|
||||
```dockerfile
|
||||
STEAMAPPVALIDATE=0 (0=skip validation, 1=validate game files)
|
||||
```
|
||||
|
||||
## Pre and Post Hooks
|
||||
|
||||
The container includes two scripts for executing custom actions:
|
||||
|
|
|
@ -11,6 +11,7 @@ LABEL maintainer="joedwards32@gmail.com"
|
|||
ENV STEAMAPPID 730
|
||||
ENV STEAMAPP cs2
|
||||
ENV STEAMAPPDIR "${HOMEDIR}/${STEAMAPP}-dedicated"
|
||||
ENV STEAMAPPVALIDATE 0
|
||||
|
||||
COPY etc/entry.sh "${HOMEDIR}/entry.sh"
|
||||
COPY etc/server.cfg "/etc/server.cfg"
|
||||
|
|
|
@ -5,9 +5,15 @@ mkdir -p "${STEAMAPPDIR}" || true
|
|||
|
||||
# Download Updates
|
||||
|
||||
if [[ "$STEAMAPPVALIDATE" -eq 1 ]]; then
|
||||
VALIDATE="validate"
|
||||
else
|
||||
VALIDATE=""
|
||||
fi
|
||||
|
||||
bash "${STEAMCMDDIR}/steamcmd.sh" +force_install_dir "${STEAMAPPDIR}" \
|
||||
+login anonymous \
|
||||
+app_update "${STEAMAPPID}" \
|
||||
+app_update "${STEAMAPPID}" "${VALIDATE}"\
|
||||
+quit
|
||||
|
||||
# steamclient.so fix
|
||||
|
|
|
@ -6,6 +6,7 @@ services:
|
|||
environment:
|
||||
# Server configuration
|
||||
- SRCDS_TOKEN # Game Server Token from https://steamcommunity.com/dev/managegameservers
|
||||
- STEAMAPPVALIDATE=0 # (0 - no validation, 1 - enable validation)
|
||||
- CS2_SERVERNAME=changeme # (Set the visible name for your private server)
|
||||
- CS2_CHEATS=0 # (0 - disable cheats, 1 - enable cheats)
|
||||
- CS2_PORT=27015 # (CS2 server listen port tcp_udp)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue