Skip to content

Commit

Permalink
Merge pull request #450 from thijsvanloef/fix-rcon-error-on-startup
Browse files Browse the repository at this point in the history
Fix RCON errors during startup
  • Loading branch information
thijsvanloef authored Feb 26, 2024
2 parents c587131 + 640d7c1 commit 668fd61
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
gettext-base=0.21-12 \
xdg-user-dirs=0.18-1 \
jo=1.9-1 \
netcat-traditional=1.10-47 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

Expand Down
6 changes: 6 additions & 0 deletions scripts/player_logging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ get_playername(){
echo "${player_info}" | sed -E 's/,([0-9]+),[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]//g'
}

# Wait until rcon port is open
while ! nc -z 127.0.0.1 "${RCON_PORT}"; do
sleep 5
LogInfo "Waiting for RCON port to open to show player logging..."
done

while true; do
server_pid=$(pidof PalServer-Linux-Test)
if [ -n "${server_pid}" ]; then
Expand Down

0 comments on commit 668fd61

Please sign in to comment.