mirror of
https://ceregatti.org/git/daniel/dayzdockerserver.git
synced 2025-05-06 14:21:18 +00:00
Add support for detecting the version of the server. It's very ghetto. There must be a better way.
This commit is contained in:
parent
5eddab9abb
commit
a905435bfc
4 changed files with 24 additions and 1 deletions
|
@ -11,6 +11,7 @@ RUN sed -i /etc/apt/sources.list.d/debian.sources -e 's/Components: main/Compone
|
||||||
|
|
||||||
# Install _only_ the necessary packages
|
# Install _only_ the necessary packages
|
||||||
RUN apt-get update && apt-get -y upgrade && apt-get -y install --no-install-recommends \
|
RUN apt-get update && apt-get -y upgrade && apt-get -y install --no-install-recommends \
|
||||||
|
binutils \
|
||||||
gwenhywfar-tools \
|
gwenhywfar-tools \
|
||||||
jq \
|
jq \
|
||||||
libxml2-utils \
|
libxml2-utils \
|
||||||
|
|
|
@ -571,6 +571,15 @@ status(){
|
||||||
# Current parameters
|
# Current parameters
|
||||||
RUNNING="${RUNNING}\nRunning Parameters: $(cat /tmp/parameters)\nRunning mod parameter: $(cat /tmp/mod_command_line)"
|
RUNNING="${RUNNING}\nRunning Parameters: $(cat /tmp/parameters)\nRunning mod parameter: $(cat /tmp/mod_command_line)"
|
||||||
fi
|
fi
|
||||||
|
# Release or Experimental
|
||||||
|
if [[ ${release_client_appid} = "221100" ]]
|
||||||
|
then
|
||||||
|
RELEASE="Stable"
|
||||||
|
else
|
||||||
|
RELEASE="Experimental"
|
||||||
|
fi
|
||||||
|
VERSION="$(strings /serverfiles/DayZServer | grep -P "DayZ \d\.\d+\.\d+" | cut -c6-) - ${RELEASE}"
|
||||||
|
# Map
|
||||||
MAP=${MAP}
|
MAP=${MAP}
|
||||||
# Number of mods plus the list denoting on or off
|
# Number of mods plus the list denoting on or off
|
||||||
echo -ne "
|
echo -ne "
|
||||||
|
@ -592,6 +601,7 @@ Working mod parameter: ${mod_command_line}"
|
||||||
if [[ "${INSTALLED}" = "${YES}" ]]
|
if [[ "${INSTALLED}" = "${YES}" ]]
|
||||||
then
|
then
|
||||||
echo "Map: ${MAP}"
|
echo "Map: ${MAP}"
|
||||||
|
echo "Version: ${VERSION}"
|
||||||
fi
|
fi
|
||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@ RUN sed -i /etc/apt/sources.list.d/debian.sources -e 's/Components: main/Compone
|
||||||
|
|
||||||
# Install _only_ the necessary packages
|
# Install _only_ the necessary packages
|
||||||
RUN apt-get update && apt-get -y upgrade && apt-get -y install --no-install-recommends \
|
RUN apt-get update && apt-get -y upgrade && apt-get -y install --no-install-recommends \
|
||||||
|
binutils \
|
||||||
curl \
|
curl \
|
||||||
gwenhywfar-tools \
|
gwenhywfar-tools \
|
||||||
jq \
|
jq \
|
||||||
|
|
13
web/bin/dz
13
web/bin/dz
|
@ -28,7 +28,7 @@ Options and arguments:
|
||||||
m|modupdate - Update the mod files
|
m|modupdate - Update the mod files
|
||||||
p|map id - Install a mod's mpmissions files by id. (Presumes template exists)
|
p|map id - Install a mod's mpmissions files by id. (Presumes template exists)
|
||||||
r|remove id - Remove all files and directories of a Workshop item by id
|
r|remove id - Remove all files and directories of a Workshop item by id
|
||||||
s|status - Shows Steam login status, if base files are installed, installed mods
|
l|s|status - Shows Steam login status, if base files are installed, installed mods
|
||||||
u|update - Update the server files
|
u|update - Update the server files
|
||||||
x|xml id - Get and normalize XML files from a mod's template by id (Presumes template exists)
|
x|xml id - Get and normalize XML files from a mod's template by id (Presumes template exists)
|
||||||
${default}"
|
${default}"
|
||||||
|
@ -260,6 +260,13 @@ status(){
|
||||||
if [ -f "${SERVER_INSTALL_FILE}" ]
|
if [ -f "${SERVER_INSTALL_FILE}" ]
|
||||||
then
|
then
|
||||||
INSTALLED="${YES}"
|
INSTALLED="${YES}"
|
||||||
|
if [[ ${release_client_appid} = "221100" ]]
|
||||||
|
then
|
||||||
|
RELEASE="Stable"
|
||||||
|
else
|
||||||
|
RELEASE="Experimental"
|
||||||
|
fi
|
||||||
|
VERSION="$(strings /serverfiles/DayZServer | grep -P "DayZ \d\.\d+\.\d+" | cut -c6-) - ${RELEASE}"
|
||||||
fi
|
fi
|
||||||
# Logged into Steam
|
# Logged into Steam
|
||||||
if [ -f "${STEAM_LOGIN}" ]
|
if [ -f "${STEAM_LOGIN}" ]
|
||||||
|
@ -281,6 +288,10 @@ Server files installed: ${INSTALLED}"
|
||||||
echo
|
echo
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
# Version of DayZ Server files
|
||||||
|
echo -ne "
|
||||||
|
Version: ${VERSION}"
|
||||||
|
|
||||||
# Mods
|
# Mods
|
||||||
echo -ne "
|
echo -ne "
|
||||||
Mods: "
|
Mods: "
|
||||||
|
|
Loading…
Add table
Reference in a new issue