fix_unt.sh 850 B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. # LinuxGSM fix_rust.sh function
  3. # Author: Daniel Gibbs
  4. # Website: https://linuxgsm.com
  5. # Description: Resolves startup issue with Unturned.
  6. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
  7. # copy steamclient to server dir to fix the below
  8. if [ ! -f "${serverfiles}/steamclient.so" ]; then
  9. fixname="steamclient.so x86_64"
  10. fn_fix_msg_start
  11. if [ -f "${HOME}/.steam/steamcmd/linux64/steamclient.so" ]; then
  12. cp "${HOME}/.steam/steamcmd/linux64/steamclient.so" "${serverfiles}/steamclient.so" >> "${lgsmlog}"
  13. elif [ -f "${steamcmddir}/linux64/steamclient.so" ]; then
  14. cp "${steamcmddir}/linux64/steamclient.so" "${serverfiles}/steamclient.so" >> "${lgsmlog}"
  15. fi
  16. fn_fix_msg_end
  17. fi
  18. # steamclient.so: cannot open shared object file: No such file or directory
  19. export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}"