From ded9892d8798d506ca64b572b2f5fcf51d4cd5fa Mon Sep 17 00:00:00 2001 From: bacalhau Date: Fri, 7 Nov 2025 22:47:55 +0000 Subject: [PATCH] fixed issue where the server wouldnt start on second boot --- Dockerfile | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 75cfb85..f887bc4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -47,11 +47,21 @@ EXPOSE ${PORT}/udp VOLUME ["/data"] ENTRYPOINT ["/bin/bash", "-c", "\ +if [ ! -f ${DATADIR}/hlds_run ]; then \ + echo 'Installing Counter-Strike server...'; \ ${STEAMCMDDIR}/steamcmd.sh +force_install_dir ${DATADIR} +login anonymous \ +app_set_config 90 mod cstrike \ +app_update 90 validate \ - +app_update 70 validate \ - +app_update 10 validate \ - +quit && \ - cd ${DATADIR} && \ - exec bash hlds_run -game cstrike -console +ip 0.0.0.0 -port ${PORT} +map ${MAP}"] + +quit; \ +else \ + if [ \"$UPDATE\" = \"1\" ]; then \ + echo 'Updating Counter-Strike server...'; \ + ${STEAMCMDDIR}/steamcmd.sh +force_install_dir ${DATADIR} +login anonymous \ + +app_update 90 validate \ + +quit; \ + else \ + echo 'Skipping update, starting server...'; \ + fi; \ +fi; \ +cd ${DATADIR} && \ +exec bash hlds_run -game cstrike -console +ip 0.0.0.0 -port ${PORT} +map ${MAP}"]