Fix lack of STEAM_PORT in env. This was an oversight from a bad merge.

This commit is contained in:
Daniel Ceregatti 2024-06-22 12:49:00 -07:00
parent d977b4d2d1
commit 269f62cd72

View file

@ -414,7 +414,10 @@ start(){
echo ${parameters} > /tmp/parameters
# Add the steam port from the environment
cp -a "${SERVER_CFG_SAVE}" "${SERVER_CFG_DST}"
sed -e "s,^steamQueryPort.*,steamQueryPort = ${STEAM_PORT};," -i "${SERVER_CFG_DST}"
if [[ ${STEAM_PORT} != "" ]]
then
sed -e "s,^steamQueryPort.*,steamQueryPort = ${STEAM_PORT};," -i "${SERVER_CFG_DST}"
fi
./DayZServer "${mod_command_line}" ${parameters}
EXIT_CODE=$?
printf "\n[ ${yellow}DayZ${default} ] Server exited. Exit code: ${EXIT_CODE}\n"