This commit is contained in:
2023-11-25 17:16:51 -06:00
parent d43c1205b2
commit 02120d559e

View File

@@ -164,7 +164,7 @@ setup_environment() {
do_sync "$MOD_CACHE/$MAP_FOLDER_NAME"/ "$SERVER_HOME/mods" || die "Failed to copy mods to $SERVER_HOME"
msg "Copying DZSA executable"
do_sync "$REMOTE_DIR/software/DZSALModServer.exe" "$SERVER_HOME"/
do_sync "$REMOTE_DIR/res/software/DZSALModServer.exe" "$SERVER_HOME"/ || die "Failed to copy DZSALModServer.exe"
}
# finds list of mods to load and stores them in .modstring file
@@ -241,11 +241,13 @@ start_server() {
load_mods || die "Could not load mods"
mod_string=$(cat .modstring)
# =====================================================================================
# creating temp.bat here to avoid the arg max char limit of windows cmd.exe
cat > temp.bat <<EOF
:start
start "DayZ Server" /min DZSALModServer.exe -config=serverDZ.cfg -port="$SERVER_PORT" -profiles=Profilesfolder -mod="$mod_string" -cpuCount="$SERVER_CPU" -dologs -adminlog -netlog -freezecheck
start "$SERVER_NAME" /min DZSALModServer.exe -config=serverDZ.cfg -port="$SERVER_PORT" -profiles=Profilesfolder -mod="$mod_string" -cpuCount="$SERVER_CPU" -dologs -adminlog -netlog -freezecheck
EOF
# =====================================================================================
# start the server
cmd.exe /C temp.bat