Skip to content

Commit

Permalink
Pushing potential fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dids committed Nov 3, 2016
1 parent 6902d52 commit ec7487d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
8 changes: 8 additions & 0 deletions docker_run_staging.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

./docker_build.sh

# Run a staging server
docker run -p 0.0.0.0:28115:28015 -p 0.0.0.0:28115:28015/udp -p 28116:28116 -p 0.0.0.0:8081:8080 -m 2g -v $(pwd)/rust_data_staging:/steamcmd/rust -e RUST_START_MODE=2 -e RUST_UPDATE_CHECKING=1 -e RUST_RCON_PORT=28116 -e RUST_BRANCH="-beta staging" -e RUST_UPDATE_BRANCH="staging" -e RUST_SERVER_STARTUP_ARGUMENTS="-batchmode -load +server.secure 1" --name rust-server-staging -d didstopia/rust-server:latest

docker logs -f rust-server-staging
18 changes: 9 additions & 9 deletions start_rust.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,16 @@ else
sed -i "s/app_update 258550.*validate/app_update 258550 validate/g" /install.txt
fi

## TODO: Check if steamcmd install/update failed

# Disable auto-update if start mode is 2
if [ "$RUST_START_MODE" = "2" ]; then
# Check that Rust exists in the first place
if [ ! -f "/steamcmd/rust/RustDedicated" ]; then
# Install Rust from install.txt
echo "Installing Rust.. (this might take a while, be patient)"
#bash /steamcmd/steamcmd.sh +runscript /install.txt
if bash /steamcmd/steamcmd.sh +runscript /install.txt | grep -q 'Error'; then
echo "Exiting, steamcmd install or update failed.."
STEAMCMD_OUTPUT=$(bash /steamcmd/steamcmd.sh +runscript /install.txt | tee /dev/stdout)
STEAMCMD_ERROR=$(echo $STEAMCMD_OUTPUT | grep -q 'Error')
if [ ! -z "$STEAMCMD_ERROR" ]; then
echo "Exiting, steamcmd install or update failed: $STEAMCMD_ERROR"
exit
fi
else
Expand All @@ -71,9 +70,10 @@ if [ "$RUST_START_MODE" = "2" ]; then
else
# Install/update Rust from install.txt
echo "Installing/updating Rust.. (this might take a while, be patient)"
#bash /steamcmd/steamcmd.sh +runscript /install.txt
if bash /steamcmd/steamcmd.sh +runscript /install.txt | grep -q 'Error'; then
echo "Exiting, steamcmd install or update failed.."
STEAMCMD_OUTPUT=$(bash /steamcmd/steamcmd.sh +runscript /install.txt | tee /dev/stdout)
STEAMCMD_ERROR=$(echo $STEAMCMD_OUTPUT | grep -q 'Error')
if [ ! -z "$STEAMCMD_ERROR" ]; then
echo "Exiting, steamcmd install or update failed: $STEAMCMD_ERROR"
exit
fi

Expand All @@ -89,7 +89,7 @@ else
fi
fi

# Rust includes a 64-bit version of steamclient.so, so we need to tell the OS where it exists
# Rust includes a 64-bit version of steamclient.so, so we need to tell the OS where it exists
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/steamcmd/rust/RustDedicated_Data/Plugins/x86_64

# Check if Oxide is enabled
Expand Down

0 comments on commit ec7487d

Please sign in to comment.