Browse Source

fix(pz): fix steamclient missing

pull/3029/head
H3o66 5 years ago
parent
commit
fe5e45d5d0
  1. 5
      lgsm/functions/core_functions.sh
  2. 2
      lgsm/functions/fix.sh
  3. 31
      lgsm/functions/fix_pz.sh

5
lgsm/functions/core_functions.sh

@ -380,6 +380,11 @@ functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_pz.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_ro.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function

2
lgsm/functions/fix.sh

@ -56,6 +56,8 @@ if [ "${commandname}" != "INSTALL" ]&&[ -z "${fixbypass}" ]; then
fix_nmrih.sh
elif [ "${shortname}" == "onset" ]; then
fix_onset.sh
elif [ "${shortname}" == "pz" ]; then
fix_pz.sh
elif [ "${shortname}" == "rust" ]; then
fix_rust.sh
elif [ "${shortname}" == "rw" ]; then

31
lgsm/functions/fix_pz.sh

@ -0,0 +1,31 @@
#!/bin/bash
# LinuxGSM fix_pz.sh function
# Author: Christian Birk
# Website: https://linuxgsm.com
# Description: Resolves various issues with Project Zomboid.
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
if [ "${shortname}" == "pz" ]; then
# Fixes: [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so.
if [ ! -f "${serverfiles}/linux32/steamclient.so" ]; then
fixname="steamclient.so x86"
fn_fix_msg_start
if [ -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" ]; then
cp "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/linux32/steamclient.so" >> "${lgsmlog}"
elif [ -f "${steamcmddir}/linux32/steamclient.so" ]; then
cp "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/linux32/steamclient.so" >> "${lgsmlog}"
fi
fn_fix_msg_end
fi
if [ ! -f "${serverfiles}/linux64/steamclient.so" ]; then
fixname="steamclient.so x86_64"
fn_fix_msg_start
if [ -f "${HOME}/.steam/steamcmd/linux64/steamclient.so" ]; then
cp "${steamcmddir}/linux64/steamclient.so" "${serverfiles}/linux64/steamclient.so" >> "${lgsmlog}"
elif [ -f "${steamcmddir}/linux64/steamclient.so" ]; then
cp "${steamcmddir}/linux64/steamclient.so" "${serverfiles}/linux64/steamclient.so" >> "${lgsmlog}"
fi
fn_fix_msg_end
fi
fi
Loading…
Cancel
Save