diff --git a/README.md b/README.md index 3876449..d53732a 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,7 @@ SRCDS_CFG="server.cfg" SRCDS_MAPCYCLE="mapcycle_default.txt" (value can be overwritten by tf/cfg/server.cfg) SRCDS_SECURED=1 (0 to start the server as insecured) SRCDS_SDR_FAKEIP=0 (1 to allow for the Steam Datagram Relay, hiding the server's IP) +SRCDS_REPLAY=0 (1 to enable replay support) ``` ## Config diff --git a/bookworm/x32/Dockerfile b/bookworm/x32/Dockerfile index cab66dd..9c1eaee 100644 --- a/bookworm/x32/Dockerfile +++ b/bookworm/x32/Dockerfile @@ -61,7 +61,8 @@ ENV SRCDS_FPSMAX=300 \ SRCDS_CFG="server.cfg" \ SRCDS_MAPCYCLE="mapcycle.txt" \ SRCDS_SECURED=1 \ - SRCDS_SDR_FAKEIP=0 + SRCDS_SDR_FAKEIP=0 \ + SRCDS_REPLAY=0 # Switch to user USER ${USER} diff --git a/bookworm/x64/Dockerfile b/bookworm/x64/Dockerfile index 6840d62..692ec6d 100644 --- a/bookworm/x64/Dockerfile +++ b/bookworm/x64/Dockerfile @@ -59,7 +59,8 @@ ENV SRCDS_FPSMAX=300 \ SRCDS_CFG="server.cfg" \ SRCDS_MAPCYCLE="mapcycle.txt" \ SRCDS_SECURED=1 \ - SRCDS_SDR_FAKEIP=0 + SRCDS_SDR_FAKEIP=0 \ + SRCDS_REPLAY=0 # Switch to user USER ${USER} diff --git a/etc/entry.sh b/etc/entry.sh index 1e94e34..51a60df 100644 --- a/etc/entry.sh +++ b/etc/entry.sh @@ -39,6 +39,12 @@ if [ "$SRCDS_SDR_FAKEIP" -eq 1 ]; then SERVER_FAKEIP_FLAG="-enablefakeip"; fi +REPLAY_FLAG=""; + +if [ "$SRCDS_REPLAY" -eq 1 ]; then + REPLAY_FLAG="-replay"; +fi + bash "${STEAMAPPDIR}/srcds_run" -game "${STEAMAPP}" -console -autoupdate \ -steam_dir "${STEAMCMDDIR}" \ -steamcmd_script "${HOMEDIR}/${STEAMAPP}_update.txt" \ @@ -59,4 +65,5 @@ bash "${STEAMAPPDIR}/srcds_run" -game "${STEAMAPP}" -console -autoupdate \ +servercfgfile "${SRCDS_CFG}" \ +mapcyclefile "${SRCDS_MAPCYCLE}" \ ${SERVER_SECURITY_FLAG} \ - ${SERVER_FAKEIP_FLAG} + ${SERVER_FAKEIP_FLAG} \ + ${REPLAY_FLAG} diff --git a/etc/entry_x64.sh b/etc/entry_x64.sh index 84c4aaa..b3f7818 100644 --- a/etc/entry_x64.sh +++ b/etc/entry_x64.sh @@ -39,6 +39,12 @@ if [ "$SRCDS_SDR_FAKEIP" -eq 1 ]; then SERVER_FAKEIP_FLAG="-enablefakeip"; fi +REPLAY_FLAG=""; + +if [ "$SRCDS_REPLAY" -eq 1 ]; then + REPLAY_FLAG="-replay"; +fi + bash "${STEAMAPPDIR}/srcds_run_64" -game "${STEAMAPP}" -console -autoupdate \ -steam_dir "${STEAMCMDDIR}" \ -steamcmd_script "${HOMEDIR}/${STEAMAPP}_update.txt" \ @@ -59,4 +65,5 @@ bash "${STEAMAPPDIR}/srcds_run_64" -game "${STEAMAPP}" -console -autoupdate \ +servercfgfile "${SRCDS_CFG}" \ +mapcyclefile "${SRCDS_MAPCYCLE}" \ ${SERVER_SECURITY_FLAG} \ - ${SERVER_FAKEIP_FLAG} + ${SERVER_FAKEIP_FLAG} \ + ${REPLAY_FLAG}