fix_wurm.sh 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #!/bin/bash
  2. # LinuxGSM fix_wurm.sh function
  3. # Author: Daniel Gibbs
  4. # Website: https://linuxgsm.com
  5. # Description: Resolves various issues with Wurm Unlimited.
  6. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
  7. # steamclient.so x86_64 fix.
  8. if [ ! -f "${serverfiles}/nativelibs/steamclient.so" ]; then
  9. fixname="steamclient.so x86_64"
  10. fn_fix_msg_start
  11. mkdir -p "${serverfiles}/nativelibs"
  12. if [ -f "${HOME}/.steam/steamcmd/linux64/steamclient.so" ]; then
  13. cp "${HOME}/.steam/steamcmd/linux64/steamclient.so" "${serverfiles}/nativelibs/steamclient.so"
  14. elif [ -f "${steamcmddir}/linux64/steamclient.so" ]; then
  15. cp "${steamcmddir}/linux64/steamclient.so" "${serverfiles}/nativelibs/steamclient.so"
  16. fi
  17. fn_fix_msg_end
  18. fi
  19. # First run requires start with no parms.
  20. # After first run new dirs are created.
  21. if [ ! -d "${serverfiles}/Creative" ]; then
  22. parmsbypass=1
  23. fixbypass=1
  24. exitbypass=1
  25. command_start.sh
  26. fn_firstcommand_reset
  27. sleep 10
  28. exitbypass=1
  29. command_stop.sh
  30. fn_firstcommand_reset
  31. unset parmsbypass
  32. fi