fix_vh.sh 759 B

123456789101112131415161718192021
  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}"; then
  13. if ! grep -qE "^executable=\"./start_server_bepinex.sh\"" "${configdirserver}/${selfname}.cfg"; then
  14. echo 'executable="./start_server_bepinex.sh"' >> "${configdirserver}/${selfname}.cfg"
  15. executable="./start_server_bepinex.sh"
  16. fi
  17. fi
  18. fi