Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- # Combined Valheim + BepInEx startup script
- # 1) Save original LD_LIBRARY_PATH so we can restore at the end
- export _OLD_LD_LIBRARY_PATH="$LD_LIBRARY_PATH"
- # 2) BepInEx “Doorstop” loader setup
- export DOORSTOP_ENABLE=TRUE
- export DOORSTOP_INVOKE_DLL_PATH=./BepInEx/core/BepInEx.Preloader.dll
- # TRY Removing the hashtag in front of this next line if script doesn't work:
- # export DOORSTOP_CORLIB_OVERRIDE_PATH=./unstripped_corlib
- # 3) Make sure Doorstop’s native libs load first
- export LD_LIBRARY_PATH="./doorstop_libs:${LD_LIBRARY_PATH}"
- export LD_PRELOAD="libdoorstop_x64.so:${LD_PRELOAD}"
- # 4) Then prepend the game’s own linux64 folder
- export LD_LIBRARY_PATH="./linux64:${LD_LIBRARY_PATH}"
- # 5) Tell Steam it’s running Valheim
- export SteamAppId=892970
- echo "Starting Valheim + BepInEx… PRESS CTRL-C to exit"
- # 6) Launch the server (exec replaces this script’s process)
- exec ./valheim_server.x86_64 \
- -name "servername" \
- -port 2456 \
- -world "worldsavefilename" \
- -password "secret" \
- -crossplay
- # 7) (Unreachable if exec succeeds—but here for completeness)
- export LD_LIBRARY_PATH="$_OLD_LD_LIBRARY_PATH"
Advertisement
Add Comment
Please, Sign In to add comment