fix_ark.sh 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/bash
  2. # LinuxGSM fix_ark.sh function
  3. # Author: Daniel Gibbs
  4. # Website: https://linuxgsm.com
  5. # Description: Resolves various issues with ARK: Survival Evolved.
  6. # removes the symlink if broken. fixes issue with older versions of LinuxGSM linking to /home/arkserver/steamcmd
  7. # rather than ${HOME}/.steam. This fix could be deprecated eventually.
  8. if [ ! -e "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux" ]; then
  9. fixname="broken steamcmd symlink"
  10. fn_fix_msg_start
  11. rm -f "${serverfiles:?}/Engine/Binaries/ThirdParty/SteamCMD/Linux"
  12. fn_fix_msg_end
  13. fi
  14. if [ ! -e "${HOME}/.steam/steamcmd/steamapps" ]; then
  15. fixname="broken steamcmd symlink"
  16. fn_fix_msg_start
  17. rm -f "${HOME}/.steam/steamcmd/steamapps"
  18. fn_fix_msg_end
  19. fi
  20. # Symlinking the SteamCMD directory into the correct ARK directory so that the mods auto-management will work.
  21. if [ ! -d "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux" ]; then
  22. fixname="steamcmd symlink"
  23. fn_fix_msg_start
  24. ln -s "${HOME}/.steam/steamcmd" "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux"
  25. fn_fix_msg_end
  26. fi
  27. if [ ! -d "${HOME}/.steam/steamcmd/steamapps" ]; then
  28. fixname="steamcmd symlink"
  29. fn_fix_msg_start
  30. ln -s "${HOME}/Steam/steamapps" "${HOME}/.steam/steamcmd/steamapps"
  31. fn_fix_msg_end
  32. fi