From 4bf5070486db7b8aac05a11b74559a9193076b6d Mon Sep 17 00:00:00 2001 From: Odaka Ui <31593320+odakaui@users.noreply.github.com> Date: Fri, 26 Jan 2024 11:45:10 -0800 Subject: [PATCH 1/3] Replace rcon client. Replace [itzg/rcon-cli](https://github.com/itzg/rcon-cli) with [gorcon/rcon-cli](https://github.com/gorcon/rcon-cli). --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e3ac9a5ee..3d884fbd9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,8 +9,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* SHELL ["/bin/bash", "-o", "pipefail", "-c"] -RUN wget -q https://github.com/itzg/rcon-cli/releases/download/1.6.4/rcon-cli_1.6.4_linux_amd64.tar.gz -O - | tar -xz && \ - mv rcon-cli /usr/bin/rcon-cli +RUN wget -q https://github.com/gorcon/rcon-cli/releases/download/v0.10.3/rcon-0.10.3-amd64_linux.tar.gz -O - | tar -xz && \ + mv rcon-0.10.3-amd64_linux/rcon /usr/bin/rcon-cli ENV PORT= \ PUID=1000 \ From d4ed4b70a3424a892da8bfe78e5b8a9c4c262668 Mon Sep 17 00:00:00 2001 From: Odaka Ui <31593320+odakaui@users.noreply.github.com> Date: Fri, 26 Jan 2024 11:50:31 -0800 Subject: [PATCH 2/3] Add quotes around `shutdown 1` `gorcon/rcon-cli` treats space separated arguments as separate commands. Adding quotes around `rcon-cli "shutdown 1"`, forces rcon-cli to treat it as a single command. --- scripts/init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/init.sh b/scripts/init.sh index 23028beea..bbf91a455 100644 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -20,7 +20,7 @@ fi term_handler() { if [ "${RCON_ENABLED}" = true ]; then rcon-cli save - rcon-cli shutdown 1 + rcon-cli "shutdown 1" else # Does not save kill -SIGTERM "$(pidof PalServer-Linux-Test)" fi From abc23dd5c5ba9adc0aaaab73157d67f9145dad10 Mon Sep 17 00:00:00 2001 From: Odaka Ui <31593320+odakaui@users.noreply.github.com> Date: Fri, 26 Jan 2024 11:53:35 -0800 Subject: [PATCH 3/3] Update rcon.yaml location. rcon-cli requires rcon.yaml to be in the current working directory. --- scripts/start.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/start.sh b/scripts/start.sh index 91590765e..164b95d00 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -68,10 +68,10 @@ if [ -n "${RCON_PORT}" ]; then fi # Configure RCON settings -cat >~/.rcon-cli.yaml </home/steam/server/rcon.yaml <