Skip to content

Commit

Permalink
rust: add support for Carbon, a rust modding framework (pterodactyl#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrazio authored Sep 30, 2023
1 parent 2d150d4 commit fc00b71
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions games/rust/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,28 @@ fi
MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')`
echo ":/home/container$ ${MODIFIED_STARTUP}"

# OxideMod has been replaced with uMod
if [ -f OXIDE_FLAG ] || [ "${OXIDE}" = 1 ] || [ "${UMOD}" = 1 ]; then
if [[ "${FRAMEWORK}" == "carbon" ]]; then
# Carbon: https://github.com/CarbonCommunity/Carbon.Core
echo "Updating Carbon..."
curl -sSL "https://github.com/CarbonCommunity/Carbon.Core/releases/download/production_build/Carbon.Linux.Release.tar.gz" | tar zx
echo "Done updating Carbon!"

export DOORSTOP_ENABLED=1
export DOORSTOP_TARGET_ASSEMBLY="$(pwd)/carbon/managed/Carbon.Preloader.dll"
MODIFIED_STARTUP="LD_PRELOAD=$(pwd)/libdoorstop.so ${MODIFIED_STARTUP}"

elif [[ "$OXIDE" == "1" ]] || [[ "${FRAMEWORK}" == "oxide" ]]; then
# Oxide: https://github.com/OxideMod/Oxide.Rust
echo "Updating uMod..."
curl -sSL "https://github.com/OxideMod/Oxide.Rust/releases/latest/download/Oxide.Rust-linux.zip" > umod.zip
unzip -o -q umod.zip
rm umod.zip
echo "Done updating uMod!"
# else Vanilla, do nothing
fi

# Fix for Rust not starting
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)
export LD_LIBRARY_PATH=$(pwd)/RustDedicated_Data/Plugins/x86_64:$(pwd)

# Run the Server
node /wrapper.js "${MODIFIED_STARTUP}"

0 comments on commit fc00b71

Please sign in to comment.