diff --git a/Dockerfile b/Dockerfile index 34487b4d1..5c8358231 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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/* diff --git a/scripts/player_logging.sh b/scripts/player_logging.sh index 166b0cc4a..bf9f98e88 100644 --- a/scripts/player_logging.sh +++ b/scripts/player_logging.sh @@ -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