Browse Source

fix(steamcmd): update steamcmd symbolic links (#2747)

* fix(steamcmd): update steamcmd symbolic links

* steamapps

* bypass apt install steamcmd if debian non-free repo is missing

* travis test
pull/2766/head
Daniel Gibbs 5 years ago
committed by GitHub
parent
commit
5eeded3f27
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      lgsm/functions/check_deps.sh
  2. 3
      lgsm/functions/check_steamcmd.sh
  3. 4
      lgsm/functions/fix_ark.sh
  4. 4
      lgsm/functions/fix_ss3.sh
  5. 32
      lgsm/functions/fix_steamcmd.sh

11
lgsm/functions/check_deps.sh

@ -327,7 +327,7 @@ fn_deps_build_debian(){
array_deps_missing=()
# LinuxGSM requirements.
array_deps_required=( curl wget ca-certificates file bsdmainutils util-linux python3 tar bzip2 gzip unzip binutils bc jq tmux steamcmd )
array_deps_required=( curl wget ca-certificates file bsdmainutils util-linux python3 tar bzip2 gzip unzip binutils bc jq tmux )
# All servers except ts3, mumble, GTA and minecraft servers require libstdc++6 and lib32gcc1.
if [ "${shortname}" != "ts3" ]&&[ "${shortname}" != "mumble" ]&&[ "${shortname}" != "mc" ]&&[ "${engine}" != "renderware" ]; then
@ -337,6 +337,15 @@ fn_deps_build_debian(){
array_deps_required+=( lib32stdc++6 )
fi
fi
# If requires steamcmd.
if [ "${appid}" ]; then
# Will not use apt if non-free repo is missing
if [ "${distroid}" == "debian" ]&& ! grep -qE "^deb .*non-free" /etc/apt/sources.list; then
:
else
array_deps_required+=( steamcmd )
fi
fi
# Game Specific requirements.

3
lgsm/functions/check_steamcmd.sh

@ -47,6 +47,9 @@ fn_check_steamcmd(){
# Checks if SteamCMD exists when starting or updating a server.
# Only install if steamcmd package is missing or steamcmd dir is missing.
if [ ! -f "${steamcmddir}/steamcmd.sh" ]&&[ -z "$(command -v steamcmd 2>/dev/null)" ]; then
echo "#############"
which steamcmd
echo "#############"
if [ "${function_selfname}" == "command_install.sh" ]; then
fn_install_steamcmd
else

4
lgsm/functions/fix_ark.sh

@ -6,9 +6,9 @@
# Symlinking the SteamCMD directory into the correct ARK directory so that the mods auto-management will work.
if [ ! -d "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux" ]; then
ln -s "${steamcmddir}" "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux"
ln -s "${HOME}/.steam/steamcmd" "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux"
fi
if [ ! -d "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps" ]; then
ln -s "$HOME/Steam/steamapps/" "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps"
ln -s "${HOME}/Steam/steamapps" "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps"
fi

4
lgsm/functions/fix_ss3.sh

@ -9,9 +9,9 @@ local commandaction="Fix"
local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")")
# Fixes https://steamcommunity.com/app/41070/discussions/0/353916981477716386/
if [ "$(diff "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/Bin/steamclient.so" >/dev/null)" ]; then
if [ "$(diff "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${serverfiles}/Bin/steamclient.so" >/dev/null)" ]; then
fixname="steamclient.so"
fn_fix_msg_start
cp -f "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/Bin/steamclient.so"
cp -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${serverfiles}/Bin/steamclient.so"
fn_fix_msg_end
fi

32
lgsm/functions/fix_steamcmd.sh

@ -13,7 +13,13 @@ if [ ! -f "${HOME}/.steam/sdk32/steamclient.so" ]; then
fixname="steamclient.so"
fn_fix_msg_start
mkdir -pv "${HOME}/.steam/sdk32" >> "${lgsmlog}"
cp -v "${steamcmddir}/linux32/steamclient.so" "${HOME}/.steam/sdk32/steamclient.so" >> "${lgsmlog}"
if [ -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" ]; then
cp -v "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${HOME}/.steam/sdk32/steamclient.so" >> "${lgsmlog}"
elif [ -f "${steamcmddir}/linux32/steamclient.so" ]; then
cp -v "${steamcmddir}/linux32/steamclient.so" "${HOME}/.steam/sdk32/steamclient.so" >> "${lgsmlog}"
else
$?=2
fi
fn_fix_msg_end
fi
@ -22,7 +28,13 @@ if [ "${shortname}" == "bt" ]; then
if [ ! -L "${executabledir}/lib64/steamclient.so" ]; then
fixname="steamclient.so x86_64"
fn_fix_msg_start
cp -s -v "${steamcmddir}/linux64/steamclient.so" "${executabledir}/lib64/steamclient.so" >> "${lgsmlog}"
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
@ -39,13 +51,25 @@ elif [ "${shortname}" == "hw" ]; then
if [ ! -f "${serverfiles}/Hurtworld_Data/Plugins/x86/steamclient.so" ]; then
fixname="steamclient.so x86"
fn_fix_msg_start
cp "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86/steamclient.so" >> "${lgsmlog}"
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
cp "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86_64/steamclient.so" >> "${lgsmlog}"
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

Loading…
Cancel
Save