From c2ca3ce46b6a3e292dfac54c4c2bf36fca05ba5f Mon Sep 17 00:00:00 2001 From: Daniel Ceregatti Date: Fri, 8 Jul 2022 22:41:42 -0700 Subject: [PATCH] Fix conflict. --- files/dayzserver | 65 ++++++++++++++++++++++++++++++++-------------- files/serverDZ.cfg | 32 ++++++++++++----------- 2 files changed, 63 insertions(+), 34 deletions(-) diff --git a/files/dayzserver b/files/dayzserver index 68c8ce6..32fc62e 100755 --- a/files/dayzserver +++ b/files/dayzserver @@ -1,5 +1,7 @@ #!/usr/bin/env bash +set -eE + # Make sure we don't start collecting core files # FIXME Set this in Docker somewhere ulimit -c 0 @@ -20,7 +22,7 @@ logs="-nologs" mods="" # modify carefully! server won't start if syntax is corrupt! -dayzparameter=" -config=${config} -port=${port} -mod='${mods}' -freezecheck ${profile} ${logs}" +dayzparameter=" -config=${config} -port=${port} -mod='${mods}' -freezecheck -fps=60 -bepath=${HOME}/serverfiles/battleye ${profile} ${logs}" # Colors default="\e[0m" @@ -107,22 +109,43 @@ fn_loadconfig_dayz(){ if [ ! -f ${SERVER_CFG_DST} ] then echo "Creating initial server configuration file" - cp "${SERVER_CFG_SRC}" "${SERVER_CFG_DST}" - else - if ! diff -q "${SERVER_CFG_SRC}" "${SERVER_CFG_DST}" - then - echo "=========================================================================" - diff -Nau --color "${SERVER_CFG_SRC}" "${SERVER_CFG_DST}" - echo "=========================================================================" - if fn_prompt_yn "The new server configuration file differs from what's installed. Use it?" - then - echo "Updating the server configuration file" - cp "${SERVER_CFG_SRC}" "${SERVER_CFG_DST}" - else - echo "NOT updating the server configuration file" - fi - fi - fi + cp "${SERVER_CFG_SRC}" "${SERVER_CFG_DST}" + elif ! diff -q "${SERVER_CFG_SRC}" "${SERVER_CFG_DST}" + then + echo "=========================================================================" + diff -Nau --color "${SERVER_CFG_SRC}" "${SERVER_CFG_DST}" || echo "" + echo "=========================================================================" + if fn_prompt_yn "The new server configuration file differs from what's installed. Use it?" + then + echo "Updating the server configuration file" + cp "${SERVER_CFG_SRC}" "${SERVER_CFG_DST}" + else + echo "NOT updating the server configuration file" + fi + fi + # battleye config and rconpassword setup + BE_SERVER_FILE="${HOME}/serverfiles/battleye/beserver_x64.cfg" + if [ ! -f "${BE_SERVER_FILE}" ] + then + passwd=$(openssl rand -base64 8 | tr -dc 'A-Za-z0-9') + if [ "${passwd}" == "" ]; then + passwd=$(< /dev/urandom tr -dc 'A-Za-z0-9' | head -c10) + fi + if [ "${passwd}" == "" ]; then + printf "[ ${red}FAIL${default} ] Could not generate a passwort for RCON!\nOpen the Battleye config with 'dayzserver rcon'." + exit 1 + else + cat > "${BE_SERVER_FILE}" <>>>>>> Stashed changes ${STEAMCMD} +force_install_dir ${SERVER_FILES} +login "${steamlogin}" +app_update "${appid}" validate +quit } @@ -319,7 +346,7 @@ fn_status(){ LOGGED_IN="${YES}" fi # Running or not - if pidof DayZServer + if pidof DayZServer > /dev/null then RUNNING="${YES}" fi diff --git a/files/serverDZ.cfg b/files/serverDZ.cfg index f842cb4..9339488 100644 --- a/files/serverDZ.cfg +++ b/files/serverDZ.cfg @@ -1,4 +1,8 @@ -hostname = "Server Name"; // Server name +hostname = "Dayz on Linux for Linux"; // Server name + +//motd[] = {"line1","line2"}; // Message of the day displayed in the in-game chat +//motdInterval = 1; // Time interval (in seconds) between each message + password = ""; // Password to connect to the server passwordAdmin = ""; // Password to become a server admin @@ -9,14 +13,14 @@ verifySignatures = 2; // Verifies .pbos against .bisign files. (only 2 is forceSameBuild = 1; // When enabled, the server will allow the connection only to clients with same the .exe revision as the server (value 0-1) disableVoN = 0; // Enable/disable voice over network (value 0-1) -vonCodecQuality = 20; // Voice over network codec quality, the higher the better (values 0-30) +vonCodecQuality = 30; // Voice over network codec quality, the higher the better (values 0-30) -disable3rdPerson=0; // Toggles the 3rd person view for players (value 0-1) -disableCrosshair=0; // Toggles the cross-hair (value 0-1) +disable3rdPerson=1; // Toggles the 3rd person view for players (value 0-1) +disableCrosshair=1; // Toggles the cross-hair (value 0-1) serverTime="SystemTime"; // Initial in-game time of the server. "SystemTime" means the local time of the machine. Another possibility is to set the time to some value in "YYYY/MM/DD/HH/MM" format, f.e. "2015/4/8/17/23" . -serverTimeAcceleration=12; // Accelerated Time (value 0-24)// This is a time multiplier for in-game time. In this case, the time would move 24 times faster than normal, so an entire day would pass in one hour. -serverTimePersistent=0; // Persistent Time (value 0-1)// The actual server time is saved to storage, so when active, the next server start will use the saved time value. +serverTimeAcceleration=6; // Accelerated Time (value 0-24)// This is a time multiplier for in-game time. In this case, the time would move 24 times faster than normal, so an entire day would pass in one hour. +serverTimePersistent=1; // Persistent Time (value 0-1)// The actual server time is saved to storage, so when active, the next server start will use the saved time value. guaranteedUpdates=1; // Communication protocol used with game server (use only number 1) @@ -30,15 +34,12 @@ storageAutoFix = 1; // Checks if the persistence files are corrupted and respawnTime = 5; // Sets the respawn delay (in seconds) before the player is able to get a new character on the server, when the previous one is dead -motd[] = {"line1","line2"}; // Message of the day displayed in the in-game chat -motdInterval = 1; // Time interval (in seconds) between each message - maxPing= 200; // Max ping value until server kick the user (value in milliseconds) timeStampFormat = "Short"; // Format for timestamps in the .rpt file (value Full/Short) -logAverageFps = 30; // Logs the average server FPS (value in seconds), needs to have -dologs launch parameter active -logMemory = 30; // Logs the server memory usage (value in seconds), needs to have the -dologs launch parameter active -logPlayers = 30; // Logs the count of currently connected players (value in seconds), needs to have the -dologs launch parameter active +//logAverageFps = 30; // Logs the average server FPS (value in seconds), needs to have -dologs launch parameter active +logMemory = 60; // Logs the server memory usage (value in seconds), needs to have the -dologs launch parameter active +logPlayers = 60; // Logs the count of currently connected players (value in seconds), needs to have the -dologs launch parameter active logFile = "server_console.log";// Saves the server console log to a file in the folder with the other server logs adminLogPlayerHitsOnly = 0; // 1 - log player hits only / 0 - log all hits ( animals/infected ) @@ -48,14 +49,14 @@ adminLogPlayerList = 0; // 1 - log periodic player list with position every 5 enableDebugMonitor = 0; // shows info about the character using a debug window in a corner of the screen (value 0-1) -steamQueryPort = 2305; // defines Steam query port, should fix the issue with server not being visible in client server browser +//steamQueryPort = 2305; // defines Steam query port, should fix the issue with server not being visible in client server browser allowFilePatching = 1; // if set to 1 it will enable connection of clients with "-filePatching" launch parameter enabled simulatedPlayersBatch = 20; // Set limit of how much players can be simulated per frame (for server performance gain) multithreadedReplication = 1; // enables multi-threaded processing of server's replication system - // number of worker threads is derived by settings of jobsystem in dayzSettings.xml by "maxcores" and "reservedcores" parameters (value 0-1) + // number of worker threads is derived by settings of jobsystem in dayzSettings.xml by "maxcores" and "reservedcores" parameters (value 0-1) networkRangeClose = 20; // network bubble distance for spawn of close objects with items in them (f.i. backpacks), set in meters, default value if not set is 20 networkRangeNear = 150; // network bubble distance for spawn (despawn +10%) of near inventory items objects, set in meters, default value if not set is 150 @@ -65,7 +66,7 @@ networkRangeDistantEffect = 4000; // network bubble distance for spawn of effect defaultVisibility=1375; // highest terrain render distance on server (if higher than "viewDistance=" in DayZ client profile, clientside parameter applies) defaultObjectViewDistance=1375; // highest object render distance on server (if higher than "preferredObjectViewDistance=" in DayZ client profile, clientside parameter applies) -lightingConfig = 0; // 0 for brighter night, 1 for darker night +lightingConfig = 1; // 0 for brighter night, 1 for darker night disablePersonalLight = 1; // disables personal light for all clients connected to server disableBaseDamage = 0; // set to 1 to disable damage/destruction of fence and watchtower @@ -75,6 +76,7 @@ class Missions { class DayZ { +// template="empty.banov" template="dayzOffline.chernarusplus"; // Mission to load on server startup. . }; };