Skip to content

Commit

Permalink
Create entrypoint.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Draakoor authored Jun 3, 2024
1 parent e75c619 commit 35cd979
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions IMAGES/ptero-plutonium-s/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash
cd /home/container

# Make internal Docker IP address available to processes.
INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}')
export INTERNAL_IP

# Installing bootstrapper / updater
wget https://github.com/mxve/plutonium-updater.rs/releases/latest/download/plutonium-updater-x86_64-unknown-linux-gnu.tar.gz -O latestupdater.tar.gz -q --show-progress
tar -xvf latestupdater.tar.gz -C localappdata/Plutonium
rm latestupdater.tar.gz
chmod +x localappdata/Plutonium/plutonium-updater
./localappdata/Plutonium/plutonium-updater -d localappdata/Plutonium
rm localappdata/Plutonium/plutonium-updater

# IW4M Admin
if [ ${IW4MA_ENABLED} ]; then
( cd /home/container/iw4madmin && dotnet Lib/IW4MAdmin.dll & )
fi;

# RCON
npm install rcon-cmd
(node node_modules/rcon-cmd/index.js connect -udp -p ${SERVER_PORT} -pw ${RCON_PASSWORD} -c false & )

# Replace Startup Variables
MODIFIED_STARTUP=$(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')
echo ":/home/container$ ${MODIFIED_STARTUP}"

# Run the Server
eval ${MODIFIED_STARTUP}

0 comments on commit 35cd979

Please sign in to comment.