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
|
||||
RUN apt-get update && apt-get -y upgrade && apt-get -y install --no-install-recommends \
|
||||
binutils \
|
||||
gwenhywfar-tools \
|
||||
jq \
|
||||
libxml2-utils \
|
||||
|
|
|
@ -571,6 +571,15 @@ status(){
|
|||
# Current parameters
|
||||
RUNNING="${RUNNING}\nRunning Parameters: $(cat /tmp/parameters)\nRunning mod parameter: $(cat /tmp/mod_command_line)"
|
||||
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}
|
||||
# Number of mods plus the list denoting on or off
|
||||
echo -ne "
|
||||
|
@ -592,6 +601,7 @@ Working mod parameter: ${mod_command_line}"
|
|||
if [[ "${INSTALLED}" = "${YES}" ]]
|
||||
then
|
||||
echo "Map: ${MAP}"
|
||||
echo "Version: ${VERSION}"
|
||||
fi
|
||||
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
|
||||
RUN apt-get update && apt-get -y upgrade && apt-get -y install --no-install-recommends \
|
||||
binutils \
|
||||
curl \
|
||||
gwenhywfar-tools \
|
||||
jq \
|
||||
|
|
13
web/bin/dz
13
web/bin/dz
|
@ -28,7 +28,7 @@ Options and arguments:
|
|||
m|modupdate - Update the mod files
|
||||
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
|
||||
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
|
||||
x|xml id - Get and normalize XML files from a mod's template by id (Presumes template exists)
|
||||
${default}"
|
||||
|
@ -260,6 +260,13 @@ status(){
|
|||
if [ -f "${SERVER_INSTALL_FILE}" ]
|
||||
then
|
||||
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
|
||||
# Logged into Steam
|
||||
if [ -f "${STEAM_LOGIN}" ]
|
||||
|
@ -281,6 +288,10 @@ Server files installed: ${INSTALLED}"
|
|||
echo
|
||||
exit 0
|
||||
fi
|
||||
# Version of DayZ Server files
|
||||
echo -ne "
|
||||
Version: ${VERSION}"
|
||||
|
||||
# Mods
|
||||
echo -ne "
|
||||
Mods: "
|
||||
|
|
Loading…
Add table
Reference in a new issue