Ensure that the mpmissions being used has all the files we need. Some don't, like Namalsk, which lacks cfggameplay.json.

Account for default ports. Another consequence from the bad merge.
This commit is contained in:
Daniel Ceregatti 2024-06-27 14:34:21 -07:00
parent 9d26bcbe44
commit 9fb3504bac
4 changed files with 28 additions and 11 deletions

View file

@ -6,6 +6,16 @@ set -eEa
# The steam query port is set in serverDZ.cfg. # The steam query port is set in serverDZ.cfg.
# Server port. Set these in the .env file for the container. # Server port. Set these in the .env file for the container.
if [[ ${SERVER_PORT} = "" ]]
then
export SERVER_PORT=2302
fi
if [[ ${RCON_PORT} = "" ]]
then
export RCON_PORT=2303
fi
export port=${SERVER_PORT} export port=${SERVER_PORT}
export rcon_port=${RCON_PORT} export rcon_port=${RCON_PORT}

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
MAP="Enoch" MAP="Default Maps"
DIR="DayZ-Central-Economy" DIR="DayZ-Central-Economy"
REPO="https://github.com/BohemiaInteractive/${DIR}.git" REPO="https://github.com/BohemiaInteractive/${DIR}.git"
MPDIR="dayzOffline.enoch" MPDIR="dayzOffline.*"

View file

@ -138,15 +138,18 @@ mergexml(){
# Copy the pristine files from upstream # Copy the pristine files from upstream
echo -e "${green}Copying upstream files into local mpmissions for map ${MAP}${default}": echo -e "${green}Copying upstream files into local mpmissions for map ${MAP}${default}":
find /mpmissions/${MAP} \( \ # Not all maps have all files, so we need to check for their existence before copying them
-name "cfgeconomycore.xml" \ for i in "cfgeconomycore.xml" "cfgenvironment.xml" "cfgeventgroups.xml" "cfgeventspawns.xml" "cfggameplay.json" "cfgweather.xml" "init.c"
-o -name "cfgenvironment.xml" \ do
-o -name "cfgeventgroups.xml" \ if [ -f /mpmissions/${MAP}/${i} ]
-o -name "cfgeventspawns.xml" \ then
-o -name "cfggameplay.json" \ cp -v /mpmissions/${MAP}/${i} ${SERVER_FILES}/${i}
-o -name "cfgweather.xml" \ else
-o -name "init.c" \ # Copy it from the Chernarus map
\) -exec cp -v {} ${SERVER_FILES}{} \; echo "The map ${MAP} does not have a ${i} file, copying from Chernarus..."
cp -v /mpmissions/dayzOffline.chernarusplus/${i} ${SERVER_FILES}/${i}
fi
done
# Same for any files in the db subdirectory we may modify # Same for any files in the db subdirectory we may modify
find /mpmissions/${MAP}/db \( \ find /mpmissions/${MAP}/db \( \

View file

@ -190,6 +190,10 @@ install(){
printf "[ ${yellow}DayZ${default} ] Downloading DayZ Server-Files!\n" printf "[ ${yellow}DayZ${default} ] Downloading DayZ Server-Files!\n"
dologin dologin
${STEAMCMD} +force_install_dir ${SERVER_FILES} +login "${steamlogin}" +app_update "${release_server_appid}" validate +quit ${STEAMCMD} +force_install_dir ${SERVER_FILES} +login "${steamlogin}" +app_update "${release_server_appid}" validate +quit
# This installs the mpmissions for charnarusplus and enoch (AKA Livonia) from github. The game once allowed the full server
# to be downloaded, but now you get the server without any mpmissions. This is a workaround.
echo "Installing mpmissions for ChernarusPlus and Livonia from github..."
map default
else else
printf "[ ${lightblue}DayZ${default} ] The server is already installed.\n" printf "[ ${lightblue}DayZ${default} ] The server is already installed.\n"
fi fi