install_fix_steam.sh 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #!/bin/bash
  2. # LGSM install_fix_steam.sh function
  3. # Author: Daniel Gibbs
  4. # Website: http://gameservermanagers.com
  5. lgsm_version="271215"
  6. fn_steamclientfix(){
  7. echo ""
  8. echo "Applying steamclient.so fix"
  9. echo "================================="
  10. sleep 1
  11. # Fixes: [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam,or a local steamclient.so.
  12. mkdir -pv "${HOME}/.steam/sdk32"
  13. cp -v "${rootdir}/steamcmd/linux32/steamclient.so" "${HOME}/.steam/sdk32/steamclient.so"
  14. sleep 1
  15. }
  16. # Server specific
  17. fn_libsteamfix(){
  18. echo ""
  19. echo "Applying libsteam.so and steamclient.so fixes"
  20. echo "================================="
  21. sleep 1
  22. if [ "${gamename}" == "Garry's Mod" ]; then
  23. # Fixes: .steam/sdk32/libsteam.so: cannot open shared object file: No such file or directory
  24. mkdir -pv "${HOME}/.steam/sdk32"
  25. cp -v "${filesdir}/bin/libsteam.so" "${HOME}/.steam/sdk32/libsteam.so"
  26. elif [ "${gamename}" == "Serious Sam 3: BFE" ]; then
  27. # Fixes: .steam/bin32/libsteam.so: cannot open shared object file: No such file or directory
  28. mkdir -pv "${HOME}/.steam/bin32"
  29. cp -v "${filesdir}/Bin/libsteam.so" "${HOME}/.steam/bin32/libsteam.so"
  30. elif [ "${gamename}" == "Hurtworld" ]; then
  31. # Fixes: [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so.
  32. cp -v "${rootdir}/steamcmd/linux32/steamclient.so" "${filesdir}/Hurtworld_Data/Plugins/x86/steamclient.so"
  33. cp -v "${rootdir}/steamcmd/linux32/steamclient.so" "${filesdir}/Hurtworld_Data/Plugins/x86_64/steamclient.so"
  34. fi
  35. sleep 1
  36. }
  37. fn_steamclientfix
  38. if [ "${gamename}" == "Garry's Mod" ]||[ "${gamename}" == "Serious Sam 3: BFE" ]||[ "${gamename}" == "Hurtworld" ]; then
  39. fn_libsteamfix
  40. fi