Browse Source

feat: add validate on start.

pull/63/head
Daniel Gibbs 7 months ago
parent
commit
c11efd5515
No known key found for this signature in database GPG Key ID: 2076B128385E8C55
  1. 3
      Dockerfile.ubuntu-2004
  2. 3
      Dockerfile.ubuntu-2204
  3. 3
      Dockerfile.ubuntu-2404
  4. 14
      entrypoint-user.sh

3
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

3
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

3
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

14
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 ""

Loading…
Cancel
Save