diff --git a/README.md b/README.md index 73cc88c..aa4bb00 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ variable|description `JRE_XMX`|Maximum amount of heap passed to the main Minecraft process `JRE_XMS`|Minimum heap size passed to the main Minecraft process `FORGE_PACK_ZIP`|If provided, the URL to a zip or tar.gz file that contains the modpack that needs to be installed. Will be intelligently extracted into the server directory through the magic of `find`. +`CONFIG_REPO`|If provided, the URI to a git repository that contains configuration to copy over top the pack. The root of the repo will be the root of the server directory. `ARGS`|Any additional arguments to be passed to the JVM ## Useful Arguments diff --git a/start-server.sh b/start-server.sh index efdac89..1fe29c7 100755 --- a/start-server.sh +++ b/start-server.sh @@ -20,6 +20,17 @@ if [ -n "$FORGE_PACK_ZIP" ]; then popd > /dev/null 2>&1 fi +# Then also download and extract a config repo, if one exists +if [ -n "$CONFIG_REPO" ]; then + echo "Downloading config repo: $CONFIG_REPO" + tmpdir="$(mktemp -d)" + pushd "$tmpdir" > /dev/null 2>&1 + git clone "$CONFIG_REPO" . + rm -rf .git + rsync -av ./ /minecraft/ + popd > /dev/null 2>&1 +fi + # Entrypoint will be server.jar args="-jar server.jar nogui"