From 0c271ad5f4d46cf9d4af41118ccedaed3cfacec0 Mon Sep 17 00:00:00 2001 From: Thijn Geurts Date: Tue, 10 Sep 2024 08:30:06 +0200 Subject: [PATCH] ea --- ea/Dockerfile | 2 -- ea/dockerstart.sh | 8 ++++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ea/Dockerfile b/ea/Dockerfile index 9e74ae4..eff0415 100644 --- a/ea/Dockerfile +++ b/ea/Dockerfile @@ -22,9 +22,7 @@ COPY dockerstart.sh / WORKDIR /home/container -ENV PORT=8192 ENV HOME=/home/container -EXPOSE 8192/udp # Set entrypoint CMD ["bash", "/dockerstart.sh"] diff --git a/ea/dockerstart.sh b/ea/dockerstart.sh index 5a3e525..d3997a9 100755 --- a/ea/dockerstart.sh +++ b/ea/dockerstart.sh @@ -6,7 +6,11 @@ npm install pm2 start bot.js cd /home/container/server -echo 'Starting server on' $PORT +echo 'Starting server on port ' "$PORT" + +MODIFIED_STARTUP=`echo ${STARTUP} | perl -pe 's@\{\{(.*?)\}\}@$ENV{$1}@g'` +echo "Startup: ${MODIFIED_STARTUP}" +eval stdbuf -oL -i0 ${MODIFIED_STARTUP} # Using stdbuf to force unbuffered output since server is not directly connected to terminal and is buffering output -stdbuf -oL ./server -allow-server-runas-root -port $PORT +#stdbuf -oL ./server -port "$PORT"