From 358e34dc0f61df80f5a41c25c4172e963c4b485b Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 17 Sep 2020 10:06:14 +0100 Subject: [PATCH] feat: various improvements to steamclient.so related messages and issues (#3040) converted ballistic overkill to 64-bit removed log parameter from hurtworld to enable verbose console converted Huttworld to 64-bit only add steamclient.so fixes for all unity3d servers standardise steamclient.so fixes mainly for unity3d servers --- .../config-lgsm/boserver/_default.cfg | 2 +- .../config-lgsm/hwserver/_default.cfg | 4 +-- lgsm/functions/core_functions.sh | 10 ++++++ lgsm/functions/fix.sh | 4 +++ lgsm/functions/fix_bo.sh | 35 +++++++++++++++++++ lgsm/functions/fix_cmw.sh | 1 + lgsm/functions/fix_cs.sh | 2 +- lgsm/functions/fix_hw.sh | 24 +------------ lgsm/functions/fix_pz.sh | 3 +- lgsm/functions/fix_st.sh | 10 ++++++ lgsm/functions/fix_tu.sh | 2 +- lgsm/functions/fix_unt.sh | 12 +++---- 12 files changed, 74 insertions(+), 35 deletions(-) create mode 100644 lgsm/functions/fix_bo.sh create mode 100644 lgsm/functions/fix_st.sh diff --git a/lgsm/config-default/config-lgsm/boserver/_default.cfg b/lgsm/config-default/config-lgsm/boserver/_default.cfg index 73f4cfedc..e7de73d0f 100644 --- a/lgsm/config-default/config-lgsm/boserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/boserver/_default.cfg @@ -155,7 +155,7 @@ glibc="2.15" ## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}" -executable="./BODS.x86" +executable="./BODS.x86_64" servercfgdir="${systemdir}" servercfg="${selfname}.txt" servercfgdefault="config.txt" diff --git a/lgsm/config-default/config-lgsm/hwserver/_default.cfg b/lgsm/config-default/config-lgsm/hwserver/_default.cfg index a68fb7e59..7e62fdc6b 100644 --- a/lgsm/config-default/config-lgsm/hwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hwserver/_default.cfg @@ -29,7 +29,7 @@ loadsave="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters # Edit with care | http://hurtworld.wikia.com/wiki/Hosting_A_Server fn_parms(){ -parms="-batchmode -nographics -exec \"host ${port} ${defaultmap} ${loadsave};queryport ${queryport};maxplayers ${maxplayers};servername ${servername};creativemode ${creativemode};${admins}\" -logfile \"${gamelog}\" " +parms="-batchmode -nographics -exec \"host ${port} ${defaultmap} ${loadsave};queryport ${queryport};maxplayers ${maxplayers};servername ${servername};creativemode ${creativemode};${admins}\"" } #### LinuxGSM Settings #### @@ -168,7 +168,7 @@ glibc="2.15" ## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}" -executable=$([ "$(uname -m)" == "x86_64" ] && echo -e "./Hurtworld.x86_64" || echo -e "./Hurtworld.x86") +executable="./Hurtworld.x86_64" ## Backup Directory backupdir="${lgsmdir}/backup" diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 081626065..a1ee7fe26 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -320,6 +320,11 @@ functionfile="${FUNCNAME[0]}" fn_fetch_function } +fix_bo.sh(){ +functionfile="${FUNCNAME[0]}" +fn_fetch_function +} + fix_cmw.sh(){ functionfile="${FUNCNAME[0]}" fn_fetch_function @@ -410,6 +415,11 @@ functionfile="${FUNCNAME[0]}" fn_fetch_function } +fix_st.sh(){ +functionfile="${FUNCNAME[0]}" +fn_fetch_function +} + fix_steamcmd.sh(){ functionfile="${FUNCNAME[0]}" fn_fetch_function diff --git a/lgsm/functions/fix.sh b/lgsm/functions/fix.sh index 9d970064b..eac243075 100644 --- a/lgsm/functions/fix.sh +++ b/lgsm/functions/fix.sh @@ -40,6 +40,8 @@ if [ "${commandname}" != "INSTALL" ]&&[ -z "${fixbypass}" ]; then fix_arma3.sh elif [ "${shortname}" == "ark" ]; then fix_ark.sh + elif [ "${shortname}" == "bo" ]; then + fix_bo.sh elif [ "${shortname}" == "cs" ]; then fix_cs.sh elif [ "${shortname}" == "csgo" ]; then @@ -74,6 +76,8 @@ if [ "${commandname}" != "INSTALL" ]&&[ -z "${fixbypass}" ]; then fix_squad.sh elif [ "${shortname}" == "ss3" ]; then fix_ss3.sh + elif [ "${shortname}" == "st" ]; then + fix_st.sh elif [ "${shortname}" == "tf2" ]; then fix_tf2.sh elif [ "${shortname}" == "terraria" ]; then diff --git a/lgsm/functions/fix_bo.sh b/lgsm/functions/fix_bo.sh new file mode 100644 index 000000000..23c9179a2 --- /dev/null +++ b/lgsm/functions/fix_bo.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# LinuxGSM fix_hw.sh function +# Author: Daniel Gibbs +# Website: https://linuxgsm.com +# Description: Resolves various issues with Ballistic Overkill. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/BODS_Data/Plugins/x86_64" + +# steamclient.so x86 fix for unity3d game server +if [ ! -f "${serverfiles}/BODS_Data/Plugins/x86/steamclient.so" ]; then + fixname="steamclient.so x86" + fn_fix_msg_start + mkdir -p "${serverfiles}/BODS_Data/Plugins/x86" + if [ -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" ]; then + cp "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${serverfiles}/BODS_Data/Plugins/x86/steamclient.so" + elif [ -f "${steamcmddir}/linux32/steamclient.so" ]; then + cp "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/BODS_Data/Plugins/x86/steamclient.so" + fi + fn_fix_msg_end +fi + +# steamclient.so x86_64 fix for unity3d game server +if [ ! -f "${serverfiles}/BODS_Data/Plugins/x86_64/steamclient.so" ]; then + fixname="steamclient.so x86_64" + fn_fix_msg_start + mkdir -p "${serverfiles}/BODS_Data/Plugins/x86_64" + if [ -f "${HOME}/.steam/steamcmd/linux64/steamclient.so" ]; then + cp "${HOME}/.steam/steamcmd/linux64/steamclient.so" "${serverfiles}/BODS_Data/Plugins/x86_64/steamclient.so" + elif [ -f "${steamcmddir}/linux64/steamclient.so" ]; then + cp "${steamcmddir}/linux64/steamclient.so" "${serverfiles}/BODS_Data/Plugins/x86_64/steamclient.so" + fi + fn_fix_msg_end +fi diff --git a/lgsm/functions/fix_cmw.sh b/lgsm/functions/fix_cmw.sh index 3a463b0b2..df80e1ee9 100644 --- a/lgsm/functions/fix_cmw.sh +++ b/lgsm/functions/fix_cmw.sh @@ -12,6 +12,7 @@ if [ ! -f "${executabledir}/steam_appid.txt" ]; then fn_fix_msg_end fi +# steamclient.so x86 fix. if [ ! -f "${executabledir}/lib/steamclient.so" ]; then fixname="steamclient.so x86" fn_fix_msg_start diff --git a/lgsm/functions/fix_cs.sh b/lgsm/functions/fix_cs.sh index fe18ea9f5..ea18702b3 100644 --- a/lgsm/functions/fix_cs.sh +++ b/lgsm/functions/fix_cs.sh @@ -6,7 +6,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -# Fixes: steamclient.so: cannot open shared object file: No such file or directory +# steamclient.so x86 fix. if [ ! -f "${serverfiles}/steamclient.so" ]; then fixname="steamclient.so x86" fn_fix_msg_start diff --git a/lgsm/functions/fix_hw.sh b/lgsm/functions/fix_hw.sh index f888748ca..4fc3dcd0d 100644 --- a/lgsm/functions/fix_hw.sh +++ b/lgsm/functions/fix_hw.sh @@ -6,26 +6,4 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -# Fixes: [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so. -if [ ! -f "${serverfiles}/Hurtworld_Data/Plugins/x86/steamclient.so" ]; then - fixname="steamclient.so x86" - fn_fix_msg_start - mkdir -p "${serverfiles}/Hurtworld_Data/Plugins/x86" - if [ -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" ]; then - cp "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86/steamclient.so" - elif [ -f "${steamcmddir}/linux32/steamclient.so" ]; then - cp "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86/steamclient.so" - fi - fn_fix_msg_end -fi -if [ ! -f "${serverfiles}/Hurtworld_Data/Plugins/x86_64/steamclient.so" ]; then - fixname="steamclient.so x86_64" - fn_fix_msg_start - mkdir -p "${serverfiles}/Hurtworld_Data/Plugins/x86_64" - if [ -f "${HOME}/.steam/steamcmd/linux64/steamclient.so" ]; then - cp "${HOME}/.steam/steamcmd/linux64/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86_64/steamclient.so" - elif [ -f "${steamcmddir}/linux64/steamclient.so" ]; then - cp "${steamcmddir}/linux64/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86_64/steamclient.so" - fi - fn_fix_msg_end -fi +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/Hurtworld_Data/Plugins/x86_64" diff --git a/lgsm/functions/fix_pz.sh b/lgsm/functions/fix_pz.sh index f59116d75..0215a390f 100644 --- a/lgsm/functions/fix_pz.sh +++ b/lgsm/functions/fix_pz.sh @@ -6,7 +6,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -# Fixes: [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so. +# steamclient.so x86 fix. if [ ! -f "${serverfiles}/linux32/steamclient.so" ]; then fixname="steamclient.so x86" fn_fix_msg_start @@ -19,6 +19,7 @@ if [ ! -f "${serverfiles}/linux32/steamclient.so" ]; then fn_fix_msg_end fi +# steamclient.so x86_64 fix. if [ ! -f "${serverfiles}/linux64/steamclient.so" ]; then fixname="steamclient.so x86_64" fn_fix_msg_start diff --git a/lgsm/functions/fix_st.sh b/lgsm/functions/fix_st.sh new file mode 100644 index 000000000..2495264da --- /dev/null +++ b/lgsm/functions/fix_st.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# LinuxGSM fix_rust.sh function +# Author: Daniel Gibbs +# Website: https://linuxgsm.com +# Description: Resolves startup issue with Stationeers. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +# Fixes: [Raknet] Server Shutting Down (Shutting Down). +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/rocketstation_DedicatedServer_Data/Plugins/x86_64" diff --git a/lgsm/functions/fix_tu.sh b/lgsm/functions/fix_tu.sh index 9f8197b63..96fec4b52 100644 --- a/lgsm/functions/fix_tu.sh +++ b/lgsm/functions/fix_tu.sh @@ -6,7 +6,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -# Fixes: [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so. +# steamclient.so x86_64 fix. if [ ! -f "${executabledir}/steamclient.so" ]; then fixname="steamclient.so x86_64" fn_fix_msg_start diff --git a/lgsm/functions/fix_unt.sh b/lgsm/functions/fix_unt.sh index eee816bfc..a46cbf847 100644 --- a/lgsm/functions/fix_unt.sh +++ b/lgsm/functions/fix_unt.sh @@ -6,17 +6,17 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -# copy steamclient to server dir to fix the below +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/Unturned_Headless_Data/Plugins/x86_64" + +# steamclient.so x86_64 fix. if [ ! -f "${serverfiles}/steamclient.so" ]; then fixname="steamclient.so x86_64" fn_fix_msg_start + mkdir -p "${serverfiles}" if [ -f "${HOME}/.steam/steamcmd/linux64/steamclient.so" ]; then - cp "${HOME}/.steam/steamcmd/linux64/steamclient.so" "${serverfiles}/steamclient.so" >> "${lgsmlog}" + cp "${HOME}/.steam/steamcmd/linux64/steamclient.so" "${serverfiles}/steamclient.so" elif [ -f "${steamcmddir}/linux64/steamclient.so" ]; then - cp "${steamcmddir}/linux64/steamclient.so" "${serverfiles}/steamclient.so" >> "${lgsmlog}" + cp "${steamcmddir}/linux64/steamclient.so" "${serverfiles}/steamclient.so" fi fn_fix_msg_end fi - -# steamclient.so: cannot open shared object file: No such file or directory -export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}"