From ce45c757c4ebe8d775b09b5bb71737a88c3d8bba Mon Sep 17 00:00:00 2001 From: Logan Saso Date: Sun, 31 Dec 2023 11:25:22 -0800 Subject: [PATCH] Revert changes that were not meant to be merged into ryansheehan's upstream --- tshock/Dockerfile | 2 ++ tshock/bootstrap.sh | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/tshock/Dockerfile b/tshock/Dockerfile index 1d6d179..94b8027 100644 --- a/tshock/Dockerfile +++ b/tshock/Dockerfile @@ -54,6 +54,8 @@ RUN apt-get update -y && \ # copy game files COPY --from=base /tshock/ /tshock/ +# Copy the plugin files to a place that bootstrap can copy them to the plugins folder at runtime +COPY --from=base /tshock/ServerPlugins/ /plugins # Set working directory to server WORKDIR /tshock diff --git a/tshock/bootstrap.sh b/tshock/bootstrap.sh index 29ca790..e2ac2be 100755 --- a/tshock/bootstrap.sh +++ b/tshock/bootstrap.sh @@ -1,8 +1,13 @@ #!/bin/bash echo "\nBootstrap:\nworld_file_name=$WORLD_FILENAME\nconfigpath=$CONFIGPATH\nlogpath=$LOGPATH\n" -echo "Copying plugins..." -cp -Rfv /plugins/* ./ServerPlugins + +# Copy plugins if the folder is empty (like on first run) +if [ -z "$(ls -A /tshock/ServerPlugins)" ]; then + echo "Copying plugins..." + cp /plugins/* /tshock/ServerPlugins +fi + if [ $(jq -r '.Settings.StorageType' $CONFIGPATH/config.json) = "mysql" ]; then DATABASE_SERVER=$(jq -r '.Settings.MySqlHost' $CONFIGPATH/config.json | cut -f1 -d':')