diff --git a/Dockerfile.ubuntu-2004 b/Dockerfile.ubuntu-2004 index 1992d33..3056fe3 100644 --- a/Dockerfile.ubuntu-2004 +++ b/Dockerfile.ubuntu-2004 @@ -18,6 +18,7 @@ ENV LGSM_DATADIR=/data/data ENV LGSM_CONFIG=/data/config-lgsm ENV LGSM_DEV=false ENV GAMESERVER=jc2server +ENV VALIDATE_ON_START=false ENV UPDATE_CHECK=60 ENV USER=linuxgsm ENV UID=1000 @@ -90,7 +91,7 @@ RUN echo "**** Install Node.js ****" \ # Install GameDig https://docs.linuxgsm.com/requirements/gamedig RUN echo "**** Install GameDig ****" \ - && npm install -g gamedig@5.0.0 + && npm install -g gamedig@5 WORKDIR /app/lgsm \ wget -N --no-check-certificate "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/${LGSM_GITHUBBRANCH}/package.json" \ && npm install diff --git a/Dockerfile.ubuntu-2204 b/Dockerfile.ubuntu-2204 index 017e59e..da8fc89 100644 --- a/Dockerfile.ubuntu-2204 +++ b/Dockerfile.ubuntu-2204 @@ -18,6 +18,7 @@ ENV LGSM_DATADIR=/data/data ENV LGSM_CONFIG=/data/config-lgsm ENV LGSM_DEV=false ENV GAMESERVER=jc2server +ENV VALIDATE_ON_START=false ENV UPDATE_CHECK=60 ENV USER=linuxgsm ENV UID=1000 @@ -90,7 +91,7 @@ RUN echo "**** Install Node.js ****" \ # Install GameDig https://docs.linuxgsm.com/requirements/gamedig RUN echo "**** Install GameDig ****" \ - && npm install -g gamedig@5.0.0 + && npm install -g gamedig@5 WORKDIR /app diff --git a/Dockerfile.ubuntu-2404 b/Dockerfile.ubuntu-2404 index c2426d1..1fe532b 100644 --- a/Dockerfile.ubuntu-2404 +++ b/Dockerfile.ubuntu-2404 @@ -18,6 +18,7 @@ ENV LGSM_DATADIR=/data/data ENV LGSM_CONFIG=/data/config-lgsm ENV LGSM_DEV=false ENV GAMESERVER=jc2server +ENV VALIDATE_ON_START=false ENV UPDATE_CHECK=60 ENV USER=linuxgsm ENV UID=1001 @@ -91,7 +92,7 @@ RUN echo "**** Install Node.js ****" \ # Install GameDig https://docs.linuxgsm.com/requirements/gamedig RUN echo "**** Install GameDig ****" \ - && npm install -g gamedig@5.0.0 + && npm install -g gamedig@5 WORKDIR /app diff --git a/entrypoint-user.sh b/entrypoint-user.sh index 7db2fce..fe91388 100755 --- a/entrypoint-user.sh +++ b/entrypoint-user.sh @@ -89,12 +89,18 @@ echo -e "=================================" echo -e "*/${UPDATE_CHECK} * * * * /app/${GAMESERVER} update > /dev/null 2>&1" | crontab - echo -e "update will check every ${UPDATE_CHECK} minutes" -# Update game server +# Update or validate game server if [ -z "${install}" ]; then echo -e "" - echo -e "Checking for Update ${GAMESERVER}" - echo -e "=================================" - ./"${GAMESERVER}" update + if [ "${VALIDATE_ON_START,,}" = "true" ]; then + echo -e "Validating ${GAMESERVER}" + echo -e "=================================" + ./"${GAMESERVER}" validate + else + echo -e "Checking for Update ${GAMESERVER}" + echo -e "=================================" + ./"${GAMESERVER}" update + fi fi echo -e ""