fix_vh.sh 760 B

1234567891011121314151617181920212223
  1. #!/bin/bash
  2. # LinuxGSM fix_rust.sh function
  3. # Author: Alasdair Haig
  4. # Website: https://linuxgsm.com
  5. # Description: Resolves startup issue with Valheim
  6. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
  7. export LD_LIBRARY_PATH=./linux64:$LD_LIBRARY_PATH
  8. # special check if Valheim Plus is installed
  9. modsdir="${lgsmdir}/mods"
  10. modsinstalledlistfullpath="${modsdir}/installed-mods.txt"
  11. if [ -f "${modsinstalledlistfullpath}" ]; then
  12. if grep -qE "^valheimplus" "${modsinstalledlistfullpath}"
  13. then
  14. if ! grep -qE "^executable=\"./start_server_bepinex.sh\"" "${configdirserver}/${selfname}.cfg"
  15. then
  16. echo 'executable="./start_server_bepinex.sh"' >> "${configdirserver}/${selfname}.cfg"
  17. executable="./start_server_bepinex.sh"
  18. fi
  19. fi
  20. fi