diff --git a/README.md b/README.md index b598655..7746484 100644 --- a/README.md +++ b/README.md @@ -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`: diff --git a/bookworm/etc/entry.sh b/bookworm/etc/entry.sh index f78af1c..a2a1f51 100644 --- a/bookworm/etc/entry.sh +++ b/bookworm/etc/entry.sh @@ -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}"\ diff --git a/examples/docker-compose.yml b/examples/docker-compose.yml index 8997463..724ce99 100644 --- a/examples/docker-compose.yml +++ b/examples/docker-compose.yml @@ -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)