mirror of
https://github.com/GameServerManagers/LinuxGSM.git
synced 2025-01-09 04:27:35 +08:00
feat(steamcmd): move steamcmd dir to standard location (#2822)
* improvements to steamclient.so fix * added fix to install inconsistent location across distros * added dev/null for master server * XDG_DATA_HOME * prevent check_last_update from restarting server if stopped
This commit is contained in:
parent
cf776ba891
commit
8f14f97ec5
@ -12,7 +12,8 @@ if [ -f "${lockdir}/lastupdate.lock" ]; then
|
|||||||
lastupdate=$(cat "${lockdir}/lastupdate.lock")
|
lastupdate=$(cat "${lockdir}/lastupdate.lock")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "${lockdir}/lastupdate.lock" ]; then
|
check_status.sh
|
||||||
|
if [ -f "${lockdir}/lastupdate.lock" ]&&[ "${status}" != "0" ]; then
|
||||||
if [ ! -f "${lockdir}/${selfname}-laststart.lock" ]||[ "${laststart}" -lt "${lastupdate}" ]; then
|
if [ ! -f "${lockdir}/${selfname}-laststart.lock" ]||[ "${laststart}" -lt "${lastupdate}" ]; then
|
||||||
fn_print_info "${selfname} has not been restarted since last update"
|
fn_print_info "${selfname} has not been restarted since last update"
|
||||||
fn_script_log_info "${selfname} has not been restarted since last update"
|
fn_script_log_info "${selfname} has not been restarted since last update"
|
||||||
|
@ -11,7 +11,7 @@ fn_install_steamcmd(){
|
|||||||
steamcmddir="${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux"
|
steamcmddir="${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux"
|
||||||
fi
|
fi
|
||||||
if [ ! -d "${steamcmddir}" ]; then
|
if [ ! -d "${steamcmddir}" ]; then
|
||||||
mkdir -pv "${steamcmddir}"
|
mkdir -p "${steamcmddir}"
|
||||||
fi
|
fi
|
||||||
fn_fetch_file "http://media.steampowered.com/client/steamcmd_linux.tar.gz" "${tmpdir}" "steamcmd_linux.tar.gz"
|
fn_fetch_file "http://media.steampowered.com/client/steamcmd_linux.tar.gz" "${tmpdir}" "steamcmd_linux.tar.gz"
|
||||||
fn_dl_extract "${tmpdir}" "steamcmd_linux.tar.gz" "${steamcmddir}"
|
fn_dl_extract "${tmpdir}" "steamcmd_linux.tar.gz" "${steamcmddir}"
|
||||||
@ -63,6 +63,47 @@ fn_check_steamcmd(){
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn_check_steamcmd_dir(){
|
||||||
|
# Worksround that pre-installs the correct steam directories to ensure all packages use the correct Standard.
|
||||||
|
# https://github.com/ValveSoftware/steam-for-linux/issues/6976#issuecomment-610446347
|
||||||
|
|
||||||
|
# Create Steam installation directory.
|
||||||
|
if [ ! -d "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" ]; then
|
||||||
|
mkdir -p "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create common Steam directory.
|
||||||
|
if [ ! -d "${HOME}/.steam" ]; then
|
||||||
|
mkdir -p "${HOME}/.steam"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Symbolic links to Steam installation directory.
|
||||||
|
if [ ! -L "${HOME}/.steam/root" ]; then
|
||||||
|
if [ -d "${HOME}/.steam/root" ]; then
|
||||||
|
rm "${HOME}/.steam/root"
|
||||||
|
fi
|
||||||
|
ln -s "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" "${HOME}/.steam/root"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -L "${HOME}/.steam/steam" ]; then
|
||||||
|
if [ -d "${HOME}/.steam/steam" ]; then
|
||||||
|
rm -rf "${HOME}/.steam/steam"
|
||||||
|
fi
|
||||||
|
ln -s "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" "${HOME}/.steam/steam"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
fn_check_steamcmd_dir_legacy(){
|
||||||
|
# Remove old Steam installation directories ~/Steam and ${rootdir}/steamcmd
|
||||||
|
if [ -d "${rootdir}/steamcmd" ]&&[ "${steamcmddir}" == "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" ]; then
|
||||||
|
rm -rf "${rootdir:?}/steamcmd"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d "${HOME}/Steam" ]&&[ "${steamcmddir}" == "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" ]; then
|
||||||
|
rm -rf "${HOME}/Steam"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
fn_check_steamcmd_ark(){
|
fn_check_steamcmd_ark(){
|
||||||
# Checks if SteamCMD exists in
|
# Checks if SteamCMD exists in
|
||||||
# Engine/Binaries/ThirdParty/SteamCMD/Linux
|
# Engine/Binaries/ThirdParty/SteamCMD/Linux
|
||||||
@ -108,5 +149,7 @@ fn_check_steamcmd
|
|||||||
if [ ${shortname} == "ark" ]; then
|
if [ ${shortname} == "ark" ]; then
|
||||||
fn_check_steamcmd_ark
|
fn_check_steamcmd_ark
|
||||||
fi
|
fi
|
||||||
|
fn_check_steamcmd_dir
|
||||||
|
fn_check_steamcmd_dir_legacy
|
||||||
fn_check_steamcmd_user
|
fn_check_steamcmd_user
|
||||||
fn_check_steamcmd_exec
|
fn_check_steamcmd_exec
|
||||||
|
@ -321,6 +321,11 @@ functionfile="${FUNCNAME[0]}"
|
|||||||
fn_fetch_function
|
fn_fetch_function
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fix_hw.sh(){
|
||||||
|
functionfile="${FUNCNAME[0]}"
|
||||||
|
fn_fetch_function
|
||||||
|
}
|
||||||
|
|
||||||
fix_ins.sh(){
|
fix_ins.sh(){
|
||||||
functionfile="${FUNCNAME[0]}"
|
functionfile="${FUNCNAME[0]}"
|
||||||
fn_fetch_function
|
fn_fetch_function
|
||||||
@ -391,6 +396,11 @@ functionfile="${FUNCNAME[0]}"
|
|||||||
fn_fetch_function
|
fn_fetch_function
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fix_tu.sh(){
|
||||||
|
functionfile="${FUNCNAME[0]}"
|
||||||
|
fn_fetch_function
|
||||||
|
}
|
||||||
|
|
||||||
fix_ut3.sh(){
|
fix_ut3.sh(){
|
||||||
functionfile="${FUNCNAME[0]}"
|
functionfile="${FUNCNAME[0]}"
|
||||||
fn_fetch_function
|
fn_fetch_function
|
||||||
|
@ -26,7 +26,7 @@ if [ -z "${lgsmlogdate}" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${steamcmddir}" ]; then
|
if [ -z "${steamcmddir}" ]; then
|
||||||
steamcmddir="${rootdir}/steamcmd"
|
steamcmddir="${HOME}/.steam/steamcmd"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${lgsmdir}" ]; then
|
if [ -z "${lgsmdir}" ]; then
|
||||||
|
@ -47,6 +47,8 @@ if [ "${function_selfname}" != "command_install.sh" ]&&[ -z "${fixbypass}" ]; th
|
|||||||
fix_dst.sh
|
fix_dst.sh
|
||||||
elif [ "${shortname}" == "ges" ]; then
|
elif [ "${shortname}" == "ges" ]; then
|
||||||
fix_ges.sh
|
fix_ges.sh
|
||||||
|
elif [ "${shortname}" == "hw" ]; then
|
||||||
|
fix_hw.sh
|
||||||
elif [ "${shortname}" == "ins" ]; then
|
elif [ "${shortname}" == "ins" ]; then
|
||||||
fix_ins.sh
|
fix_ins.sh
|
||||||
elif [ "${shortname}" == "nmrih" ]; then
|
elif [ "${shortname}" == "nmrih" ]; then
|
||||||
@ -71,6 +73,8 @@ if [ "${function_selfname}" != "command_install.sh" ]&&[ -z "${fixbypass}" ]; th
|
|||||||
fix_terraria.sh
|
fix_terraria.sh
|
||||||
elif [ "${shortname}" == "ts3" ]; then
|
elif [ "${shortname}" == "ts3" ]; then
|
||||||
fix_ts3.sh
|
fix_ts3.sh
|
||||||
|
elif [ "${shortname}" == "tu" ]; then
|
||||||
|
fix_tu.sh
|
||||||
elif [ "${shortname}" == "mcb" ]; then
|
elif [ "${shortname}" == "mcb" ]; then
|
||||||
fix_mcb.sh
|
fix_mcb.sh
|
||||||
elif [ "${shortname}" == "mta" ]; then
|
elif [ "${shortname}" == "mta" ]; then
|
||||||
|
@ -9,9 +9,9 @@ local commandaction="Fix"
|
|||||||
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
|
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||||
|
|
||||||
# Fixes: 20150 Segmentation fault (core dumped) error.
|
# Fixes: 20150 Segmentation fault (core dumped) error.
|
||||||
if [ ! -d "${HOME}/.local/share/Arma 3" ]||[ ! -d "${HOME}/.local/share/Arma 3 - Other Profiles" ]; then
|
if [ ! -d "${XDG_DATA_HOME:="${HOME}/.local/share"}/Arma 3" ]||[ ! -d "${XDG_DATA_HOME:="${HOME}/.local/share"}/Arma 3 - Other Profiles" ]; then
|
||||||
fixname="20150 Segmentation fault (core dumped)"
|
fixname="20150 Segmentation fault (core dumped)"
|
||||||
fn_fix_msg_start
|
fn_fix_msg_start
|
||||||
mkdir -p "${HOME}/.local/share/Arma 3 - Other Profiles"
|
mkdir -p "${XDG_DATA_HOME:="${HOME}/.local/share"}/Arma 3 - Other Profiles"
|
||||||
fn_fix_msg_end
|
fn_fix_msg_end
|
||||||
fi
|
fi
|
||||||
|
33
lgsm/functions/fix_hw.sh
Normal file
33
lgsm/functions/fix_hw.sh
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# LinuxGSM fix_hw.sh function
|
||||||
|
# Author: Daniel Gibbs
|
||||||
|
# Website: https://linuxgsm.com
|
||||||
|
# Description: Resolves various issues with Hurtworld.
|
||||||
|
|
||||||
|
if [ "${shortname}" == "hw" ]; then
|
||||||
|
# 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
|
||||||
|
if [ -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" ]; then
|
||||||
|
cp -v "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86/steamclient.so" >> "${lgsmlog}"
|
||||||
|
elif [ -f "${steamcmddir}/linux32/steamclient.so" ]; then
|
||||||
|
cp -v "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86/steamclient.so" >> "${lgsmlog}"
|
||||||
|
else
|
||||||
|
:
|
||||||
|
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
|
||||||
|
if [ -f "${HOME}/.steam/steamcmd/linux64/steamclient.so" ]; then
|
||||||
|
cp -v "${HOME}/.steam/steamcmd/linux64/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86_64/steamclient.so" >> "${lgsmlog}"
|
||||||
|
elif [ -f "${steamcmddir}/linux64/steamclient.so" ]; then
|
||||||
|
cp -v "${steamcmddir}/linux64/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86_64/steamclient.so" >> "${lgsmlog}"
|
||||||
|
else
|
||||||
|
:
|
||||||
|
fi
|
||||||
|
fn_fix_msg_end
|
||||||
|
fi
|
||||||
|
fi
|
@ -2,7 +2,7 @@
|
|||||||
# LinuxGSM fix_mcb.sh function
|
# LinuxGSM fix_mcb.sh function
|
||||||
# Author: Daniel Gibbs
|
# Author: Daniel Gibbs
|
||||||
# Website: https://linuxgsm.com
|
# Website: https://linuxgsm.com
|
||||||
# Description: Resolves possible startup issue with Minecraft Bedrock
|
# Description: Resolves possible startup issue with Minecraft Bedrock.
|
||||||
|
|
||||||
local modulename="FIX"
|
local modulename="FIX"
|
||||||
local commandaction="Fix"
|
local commandaction="Fix"
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
# Author: Daniel Gibbs
|
# Author: Daniel Gibbs
|
||||||
# Contributor: ChaosMTA
|
# Contributor: ChaosMTA
|
||||||
# Website: https://linuxgsm.com
|
# Website: https://linuxgsm.com
|
||||||
# Description: Installs the libmysqlclient for database functions on the server
|
# Description: Installs the libmysqlclient for database functions on the server.
|
||||||
|
|
||||||
local modulename="FIX"
|
local modulename="FIX"
|
||||||
local commandaction="Fix"
|
local commandaction="Fix"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# LinuxGSM fix_nmrih.sh function
|
# LinuxGSM fix_nmrih.sh function
|
||||||
# Author: Denperidge
|
# Author: Denperidge
|
||||||
# Description: Create symlinks for renamed No More Room In Hell serverfiles
|
# Description: Create symlinks for renamed No More Room In Hell serverfiles.
|
||||||
# Solution from Steam Community post: https://steamcommunity.com/app/224260/discussions/2/1732089092441769414/
|
# Solution from Steam Community post: https://steamcommunity.com/app/224260/discussions/2/1732089092441769414/
|
||||||
|
|
||||||
local modulename="FIX"
|
local modulename="FIX"
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# LinuxGSM fix_onset.sh function
|
# LinuxGSM fix_onset.sh function
|
||||||
# Author: Frédéric C.
|
# Author: Frédéric C.
|
||||||
# Website: https://linuxgsm.com
|
# Website: https://linuxgsm.com
|
||||||
# Description: Resolves various issues with Onset
|
# Description: Resolves various issues with Onset.
|
||||||
|
|
||||||
local modulename="FIX"
|
local modulename="FIX"
|
||||||
local commandaction="Fix"
|
local commandaction="Fix"
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# LinuxGSM fix_rust.sh function
|
# LinuxGSM fix_rust.sh function
|
||||||
# Author: Daniel Gibbs
|
# Author: Daniel Gibbs
|
||||||
# Website: https://linuxgsm.com
|
# Website: https://linuxgsm.com
|
||||||
# Description: Resolves startup issue with Rust
|
# Description: Resolves startup issue with Rust.
|
||||||
|
|
||||||
local modulename="FIX"
|
local modulename="FIX"
|
||||||
local commandaction="Fix"
|
local commandaction="Fix"
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# LinuxGSM fix_rw.sh function
|
# LinuxGSM fix_rw.sh function
|
||||||
# Author: Daniel Gibbs
|
# Author: Daniel Gibbs
|
||||||
# Website: https://linuxgsm.com
|
# Website: https://linuxgsm.com
|
||||||
# Description: Resolves startup issue with Rising World
|
# Description: Resolves various issues with Rising World.
|
||||||
|
|
||||||
local modulename="FIX"
|
local modulename="FIX"
|
||||||
local commandaction="Fix"
|
local commandaction="Fix"
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# LinuxGSM fix_sdtd.sh function
|
# LinuxGSM fix_sdtd.sh function
|
||||||
# Author: Daniel Gibbs
|
# Author: Daniel Gibbs
|
||||||
# Website: https://linuxgsm.com
|
# Website: https://linuxgsm.com
|
||||||
# Description: Resolves startup issue with 7 Days to Die
|
# Description: Resolves various issues with 7 Days to Die.
|
||||||
|
|
||||||
local modulename="FIX"
|
local modulename="FIX"
|
||||||
local commandaction="Fix"
|
local commandaction="Fix"
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# LinuxGSM fix_rust.sh function
|
# LinuxGSM fix_rust.sh function
|
||||||
# Author: Daniel Gibbs
|
# Author: Daniel Gibbs
|
||||||
# Website: https://linuxgsm.com
|
# Website: https://linuxgsm.com
|
||||||
# Description: Resolves startup issue with Soldier of Fortune 2
|
# Description: Resolves various issues with Soldier of Fortune 2.
|
||||||
|
|
||||||
local modulename="FIX"
|
local modulename="FIX"
|
||||||
local commandaction="Fix"
|
local commandaction="Fix"
|
||||||
|
@ -8,10 +8,19 @@ local modulename="FIX"
|
|||||||
local commandaction="Fix"
|
local commandaction="Fix"
|
||||||
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
|
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||||
|
|
||||||
# Fixes https://steamcommunity.com/app/41070/discussions/0/353916981477716386/
|
# Fixes: https://steamcommunity.com/app/41070/discussions/0/353916981477716386/
|
||||||
if [ "$(diff "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${serverfiles}/Bin/steamclient.so" >/dev/null)" ]; then
|
if [ ! -f "${serverfiles}/Bin/steamclient.so" ]||[ "$(diff "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${serverfiles}/Bin/steamclient.so" 2>/dev/null)" ]; then
|
||||||
fixname="steamclient.so"
|
fixname="steamclient.so"
|
||||||
fn_fix_msg_start
|
fn_fix_msg_start
|
||||||
cp -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${serverfiles}/Bin/steamclient.so"
|
cp -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${serverfiles}/Bin/steamclient.so"
|
||||||
fn_fix_msg_end
|
fn_fix_msg_end
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Fixes: .steam/bin32/libsteam.so: cannot open shared object file: No such file or directory
|
||||||
|
if [ ! -f "${HOME}/.steam/bin32/libsteam.so" ]; then
|
||||||
|
fixname="libsteam.so"
|
||||||
|
fn_fix_msg_start
|
||||||
|
mkdir -pv "${HOME}/.steam/bin32" >> "${lgsmlog}"
|
||||||
|
cp "${serverfiles}/Bin/libsteam.so" "${HOME}/.steam/bin32/libsteam.so" >> "${lgsmlog}"
|
||||||
|
fn_fix_msg_end
|
||||||
|
fi
|
||||||
|
@ -8,9 +8,24 @@ local modulename="FIX"
|
|||||||
local commandaction="Fix"
|
local commandaction="Fix"
|
||||||
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
|
local function_selfname="$(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.
|
# Helps fix: [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam,or a local steamclient.so.
|
||||||
|
if [ ! -f "${HOME}/.steam/sdk64/steamclient.so" ]; then
|
||||||
|
fixname="steamclient.so sdk64"
|
||||||
|
fn_fix_msg_start
|
||||||
|
mkdir -pv "${HOME}/.steam/sdk64" >> "${lgsmlog}"
|
||||||
|
if [ -f "${HOME}/.steam/steamcmd/linux64/steamclient.so" ]; then
|
||||||
|
cp -v "${HOME}/.steam/steamcmd/linux64/steamclient.so" "${HOME}/.steam/sdk64/steamclient.so" >> "${lgsmlog}"
|
||||||
|
elif [ -f "${steamcmddir}/linux64/steamclient.so" ]; then
|
||||||
|
cp -v "${steamcmddir}/linux64/steamclient.so" "${HOME}/.steam/sdk64/steamclient.so" >> "${lgsmlog}"
|
||||||
|
else
|
||||||
|
$?=2
|
||||||
|
fi
|
||||||
|
fn_fix_msg_end
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Helps fix: [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam,or a local steamclient.so.
|
||||||
if [ ! -f "${HOME}/.steam/sdk32/steamclient.so" ]; then
|
if [ ! -f "${HOME}/.steam/sdk32/steamclient.so" ]; then
|
||||||
fixname="steamclient.so"
|
fixname="steamclient.so sdk32"
|
||||||
fn_fix_msg_start
|
fn_fix_msg_start
|
||||||
mkdir -pv "${HOME}/.steam/sdk32" >> "${lgsmlog}"
|
mkdir -pv "${HOME}/.steam/sdk32" >> "${lgsmlog}"
|
||||||
if [ -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" ]; then
|
if [ -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" ]; then
|
||||||
@ -22,62 +37,3 @@ if [ ! -f "${HOME}/.steam/sdk32/steamclient.so" ]; then
|
|||||||
fi
|
fi
|
||||||
fn_fix_msg_end
|
fn_fix_msg_end
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${shortname}" == "bt" ]; then
|
|
||||||
# Fixes: [S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
|
|
||||||
if [ ! -L "${executabledir}/lib64/steamclient.so" ]; then
|
|
||||||
fixname="steamclient.so x86_64"
|
|
||||||
fn_fix_msg_start
|
|
||||||
if [ -f "${HOME}/.steam/steamcmd/linux64/steamclient.so" ]; then
|
|
||||||
cp -v "${HOME}/.steam/steamcmd/linux64/steamclient.so" "${executabledir}/lib64/steamclient.so" >> "${lgsmlog}"
|
|
||||||
elif [ -f "${steamcmddir}/linux64/steamclient.so" ]; then
|
|
||||||
cp -v "${steamcmddir}/linux64/steamclient.so" "${executabledir}/lib64/steamclient.so" >> "${lgsmlog}"
|
|
||||||
else
|
|
||||||
$?=2
|
|
||||||
fi
|
|
||||||
fn_fix_msg_end
|
|
||||||
fi
|
|
||||||
elif [ "${shortname}" == "ss3" ]; then
|
|
||||||
# Fixes: .steam/bin32/libsteam.so: cannot open shared object file: No such file or directory
|
|
||||||
if [ ! -f "${HOME}/.steam/bin32/libsteam.so" ]; then
|
|
||||||
fixname="libsteam.so"
|
|
||||||
fn_fix_msg_start
|
|
||||||
mkdir -pv "${HOME}/.steam/bin32" >> "${lgsmlog}"
|
|
||||||
cp "${serverfiles}/Bin/libsteam.so" "${HOME}/.steam/bin32/libsteam.so" >> "${lgsmlog}"
|
|
||||||
fn_fix_msg_end
|
|
||||||
fi
|
|
||||||
elif [ "${shortname}" == "hw" ]; then
|
|
||||||
# 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
|
|
||||||
if [ -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" ]; then
|
|
||||||
cp -v "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86/steamclient.so" >> "${lgsmlog}"
|
|
||||||
elif [ -f "${steamcmddir}/linux32/steamclient.so" ]; then
|
|
||||||
cp -v "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86/steamclient.so" >> "${lgsmlog}"
|
|
||||||
else
|
|
||||||
:
|
|
||||||
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
|
|
||||||
if [ -f "${HOME}/.steam/steamcmd/linux64/steamclient.so" ]; then
|
|
||||||
cp -v "${HOME}/.steam/steamcmd/linux64/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86_64/steamclient.so" >> "${lgsmlog}"
|
|
||||||
elif [ -f "${steamcmddir}/linux64/steamclient.so" ]; then
|
|
||||||
cp -v "${steamcmddir}/linux64/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86_64/steamclient.so" >> "${lgsmlog}"
|
|
||||||
else
|
|
||||||
:
|
|
||||||
fi
|
|
||||||
fn_fix_msg_end
|
|
||||||
fi
|
|
||||||
elif [ "${shortname}" == "tu" ]; then
|
|
||||||
# Fixes: [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so.
|
|
||||||
if [ ! -f "${executabledir}/steamclient.so" ]; then
|
|
||||||
fixname="steamclient.so"
|
|
||||||
fn_fix_msg_start
|
|
||||||
cp -v "${serverfiles}/linux64/steamclient.so" "${executabledir}/steamclient.so" >> "${lgsmlog}"
|
|
||||||
fn_fix_msg_end
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
15
lgsm/functions/fix_tu.sh
Normal file
15
lgsm/functions/fix_tu.sh
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# LinuxGSM fix_tu.sh function
|
||||||
|
# Author: Daniel Gibbs
|
||||||
|
# Website: https://linuxgsm.com
|
||||||
|
# Description: Resolves various issues with Tower Unite.
|
||||||
|
|
||||||
|
if [ "${shortname}" == "tu" ]; then
|
||||||
|
# Fixes: [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so.
|
||||||
|
if [ ! -f "${executabledir}/steamclient.so" ]; then
|
||||||
|
fixname="steamclient.so"
|
||||||
|
fn_fix_msg_start
|
||||||
|
cp -v "${serverfiles}/linux64/steamclient.so" "${executabledir}/steamclient.so" >> "${lgsmlog}"
|
||||||
|
fn_fix_msg_end
|
||||||
|
fi
|
||||||
|
fi
|
@ -2,7 +2,7 @@
|
|||||||
# LinuxGSM fix_rust.sh function
|
# LinuxGSM fix_rust.sh function
|
||||||
# Author: Daniel Gibbs
|
# Author: Daniel Gibbs
|
||||||
# Website: https://linuxgsm.com
|
# Website: https://linuxgsm.com
|
||||||
# Description: Resolves startup issue with Unturned
|
# Description: Resolves startup issue with Unturned.
|
||||||
|
|
||||||
local modulename="FIX"
|
local modulename="FIX"
|
||||||
local commandaction="Fix"
|
local commandaction="Fix"
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# LinuxGSM fix_ut2.sh function
|
# LinuxGSM fix_ut2.sh function
|
||||||
# Author: Daniel Gibbs
|
# Author: Daniel Gibbs
|
||||||
# Website: https://linuxgsm.com
|
# Website: https://linuxgsm.com
|
||||||
# Description: Resolves various issues with configs in Unreal Tournament 3.
|
# Description: Resolves various issues with Unreal Tournament 3.
|
||||||
|
|
||||||
local modulename="FIX"
|
local modulename="FIX"
|
||||||
local commandaction="Fix"
|
local commandaction="Fix"
|
||||||
|
@ -2,7 +2,10 @@
|
|||||||
# LinuxGSM fix_wurm.sh function
|
# LinuxGSM fix_wurm.sh function
|
||||||
# Author: Daniel Gibbs
|
# Author: Daniel Gibbs
|
||||||
# Website: https://linuxgsm.com
|
# Website: https://linuxgsm.com
|
||||||
# Description: Resolves various issues with ARK: Survival Evolved.
|
# Description: Resolves various issues with Wurm Unlimited.
|
||||||
|
|
||||||
|
local modulename="FIX"
|
||||||
|
local commandaction="Fix"
|
||||||
|
|
||||||
local modulename="FIX"
|
local modulename="FIX"
|
||||||
local commandaction="Fix"
|
local commandaction="Fix"
|
||||||
|
@ -263,9 +263,9 @@ fi
|
|||||||
if [ "$(command -v jq 2>/dev/null)" ]; then
|
if [ "$(command -v jq 2>/dev/null)" ]; then
|
||||||
if [ "${ip}" ]&&[ "${port}" ]; then
|
if [ "${ip}" ]&&[ "${port}" ]; then
|
||||||
if [ "${steammaster}" == "true" ]; then
|
if [ "${steammaster}" == "true" ]; then
|
||||||
masterserver=$(curl -m 3 -s 'https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr='${ip}':'${port}'&format=json' | jq '.response.servers[]|.addr' | wc -l)
|
masterserver=$(curl -m 3 -s 'https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr='${ip}':'${port}'&format=json' | jq '.response.servers[]|.addr' | wc -l 2>/dev/null)
|
||||||
if [ "${masterserver}" == "0" ]; then
|
if [ "${masterserver}" == "0" ]; then
|
||||||
masterserver=$(curl -m 3 -s 'https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr='${extip}':'${port}'&format=json' | jq '.response.servers[]|.addr' | wc -l)
|
masterserver=$(curl -m 3 -s 'https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr='${extip}':'${port}'&format=json' | jq '.response.servers[]|.addr' | wc -l 2>/dev/null)
|
||||||
fi
|
fi
|
||||||
if [ "${masterserver}" == "0" ]; then
|
if [ "${masterserver}" == "0" ]; then
|
||||||
displaymasterserver="false"
|
displaymasterserver="false"
|
||||||
|
@ -28,7 +28,7 @@ selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")")
|
|||||||
lgsmdir="${rootdir}/lgsm"
|
lgsmdir="${rootdir}/lgsm"
|
||||||
logdir="${rootdir}/log"
|
logdir="${rootdir}/log"
|
||||||
lgsmlogdir="${logdir}/lgsm"
|
lgsmlogdir="${logdir}/lgsm"
|
||||||
steamcmddir="${rootdir}/steamcmd"
|
steamcmddir="${HOME}/.steam/steamcmd"
|
||||||
serverfiles="${rootdir}/serverfiles"
|
serverfiles="${rootdir}/serverfiles"
|
||||||
functionsdir="${lgsmdir}/functions"
|
functionsdir="${lgsmdir}/functions"
|
||||||
tmpdir="${lgsmdir}/tmp"
|
tmpdir="${lgsmdir}/tmp"
|
||||||
|
@ -28,7 +28,7 @@ selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")")
|
|||||||
lgsmdir="${rootdir}/lgsm"
|
lgsmdir="${rootdir}/lgsm"
|
||||||
logdir="${rootdir}/log"
|
logdir="${rootdir}/log"
|
||||||
lgsmlogdir="${logdir}/lgsm"
|
lgsmlogdir="${logdir}/lgsm"
|
||||||
steamcmddir="${rootdir}/steamcmd"
|
steamcmddir="${HOME}/.steam/steamcmd"
|
||||||
serverfiles="${rootdir}/serverfiles"
|
serverfiles="${rootdir}/serverfiles"
|
||||||
functionsdir="${lgsmdir}/functions"
|
functionsdir="${lgsmdir}/functions"
|
||||||
tmpdir="${lgsmdir}/tmp"
|
tmpdir="${lgsmdir}/tmp"
|
||||||
@ -591,7 +591,7 @@ getopt="abc123"
|
|||||||
set -x
|
set -x
|
||||||
core_getopt.sh
|
core_getopt.sh
|
||||||
)
|
)
|
||||||
fn_test_result_fail
|
fn_test_result_pass
|
||||||
echo -e "run order"
|
echo -e "run order"
|
||||||
echo -e "================="
|
echo -e "================="
|
||||||
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
|
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
|
||||||
|
@ -28,7 +28,7 @@ selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")")
|
|||||||
lgsmdir="${rootdir}/lgsm"
|
lgsmdir="${rootdir}/lgsm"
|
||||||
logdir="${rootdir}/log"
|
logdir="${rootdir}/log"
|
||||||
lgsmlogdir="${logdir}/lgsm"
|
lgsmlogdir="${logdir}/lgsm"
|
||||||
steamcmddir="${rootdir}/steamcmd"
|
steamcmddir="${HOME}/.steam/steamcmd"
|
||||||
serverfiles="${rootdir}/serverfiles"
|
serverfiles="${rootdir}/serverfiles"
|
||||||
functionsdir="${lgsmdir}/functions"
|
functionsdir="${lgsmdir}/functions"
|
||||||
tmpdir="${lgsmdir}/tmp"
|
tmpdir="${lgsmdir}/tmp"
|
||||||
@ -591,7 +591,7 @@ getopt="abc123"
|
|||||||
set -x
|
set -x
|
||||||
core_getopt.sh
|
core_getopt.sh
|
||||||
)
|
)
|
||||||
fn_test_result_fail
|
fn_test_result_pass
|
||||||
echo -e "run order"
|
echo -e "run order"
|
||||||
echo -e "================="
|
echo -e "================="
|
||||||
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
|
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
|
||||||
|
@ -28,7 +28,7 @@ selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")")
|
|||||||
lgsmdir="${rootdir}/lgsm"
|
lgsmdir="${rootdir}/lgsm"
|
||||||
logdir="${rootdir}/log"
|
logdir="${rootdir}/log"
|
||||||
lgsmlogdir="${logdir}/lgsm"
|
lgsmlogdir="${logdir}/lgsm"
|
||||||
steamcmddir="${rootdir}/steamcmd"
|
steamcmddir="${HOME}/.steam/steamcmd"
|
||||||
serverfiles="${rootdir}/serverfiles"
|
serverfiles="${rootdir}/serverfiles"
|
||||||
functionsdir="${lgsmdir}/functions"
|
functionsdir="${lgsmdir}/functions"
|
||||||
tmpdir="${lgsmdir}/tmp"
|
tmpdir="${lgsmdir}/tmp"
|
||||||
@ -591,7 +591,7 @@ getopt="abc123"
|
|||||||
set -x
|
set -x
|
||||||
core_getopt.sh
|
core_getopt.sh
|
||||||
)
|
)
|
||||||
fn_test_result_fail
|
fn_test_result_pass
|
||||||
echo -e "run order"
|
echo -e "run order"
|
||||||
echo -e "================="
|
echo -e "================="
|
||||||
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
|
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
|
||||||
|
@ -28,7 +28,7 @@ selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")")
|
|||||||
lgsmdir="${rootdir}/lgsm"
|
lgsmdir="${rootdir}/lgsm"
|
||||||
logdir="${rootdir}/log"
|
logdir="${rootdir}/log"
|
||||||
lgsmlogdir="${logdir}/lgsm"
|
lgsmlogdir="${logdir}/lgsm"
|
||||||
steamcmddir="${rootdir}/steamcmd"
|
steamcmddir="${HOME}/.steam/steamcmd"
|
||||||
serverfiles="${rootdir}/serverfiles"
|
serverfiles="${rootdir}/serverfiles"
|
||||||
functionsdir="${lgsmdir}/functions"
|
functionsdir="${lgsmdir}/functions"
|
||||||
tmpdir="${lgsmdir}/tmp"
|
tmpdir="${lgsmdir}/tmp"
|
||||||
@ -591,7 +591,7 @@ getopt="abc123"
|
|||||||
set -x
|
set -x
|
||||||
core_getopt.sh
|
core_getopt.sh
|
||||||
)
|
)
|
||||||
fn_test_result_fail
|
fn_test_result_pass
|
||||||
echo -e "run order"
|
echo -e "run order"
|
||||||
echo -e "================="
|
echo -e "================="
|
||||||
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
|
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
|
||||||
|
Loading…
Reference in New Issue
Block a user