Skip to content

Commit

Permalink
Merge pull request #154 from joedwards32/142-server-gets-error-when-a…
Browse files Browse the repository at this point in the history
…ttempting-to-update

Add DEBUG variable to control logging verbosity
  • Loading branch information
joedwards32 authored Feb 9, 2025
2 parents a36e8c2 + d9bea07 commit 52ddac6
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,14 @@ ds_workshop_changelevel $map_name

# Customizing this Container

## Debug Logging

If you want to increase the verbosity of log output set the `DEBUG` environment variable:

```dockerfile
DEBUG=0 (0=none, 1=steamcmd, 2=cs2, 3=all)
```

## 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`:
Expand Down
18 changes: 16 additions & 2 deletions bookworm/etc/entry.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,31 @@
#!/bin/bash

# Debug

## Steamcmd debugging
if [[ $DEBUG -eq 1 ]] || [[ $DEBUG -eq 3 ]]; then
STEAMCMD_SPEW="+set_spew_level 4 4"
fi
## CS2 server debugging
if [[ $DEBUG -eq 2 ]] || [[ $DEBUG -eq 3 ]]; then
CS2_LOG="on"
CS2_LOG_MONEY=1
CS2_LOG_DETAIL=3
CS2_LOG_ITEMS=1
fi

# Create App Dir
mkdir -p "${STEAMAPPDIR}" || true

# Download Updates

if [[ "$STEAMAPPVALIDATE" -eq 1 ]]; then
VALIDATE="validate"
else
VALIDATE=""
fi

eval bash "${STEAMCMDDIR}/steamcmd.sh" +force_install_dir "${STEAMAPPDIR}" \
eval bash "${STEAMCMDDIR}/steamcmd.sh" "${STEAMCMD_SPEW}"\
+force_install_dir "${STEAMAPPDIR}" \
+@bClientTryRequestManifestWithoutCode 1 \
+login anonymous \
+app_update "${STEAMAPPID}" "${VALIDATE}"\
Expand Down
1 change: 1 addition & 0 deletions examples/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ services:
environment:
# Server configuration
- SRCDS_TOKEN # Game Server Token from https://steamcommunity.com/dev/managegameservers
- DEBUG=0 # (0 - off, 1 - steamcmd, 2 - cs2, 3 - all)
- 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)
Expand Down

0 comments on commit 52ddac6

Please sign in to comment.