Default bStats configuration to false (opt-in)
- Pre-create bStats config with `enabled: false` by default - Apply changes to CraftBukkit, Spigot, and Paper Dockerfiles - Consistent with existing implementation in Velocity proxy image
This commit is contained in:
		| @@ -14,6 +14,10 @@ ARG PREFIX="PLUGIN_" | |||||||
| ARG BASE_URL="https://hub.spigotmc.org/jenkins/job/BuildTools/" | ARG BASE_URL="https://hub.spigotmc.org/jenkins/job/BuildTools/" | ||||||
| ARG ARTIFACT_PATH="lastSuccessfulBuild/artifact/target/BuildTools.jar" | ARG ARTIFACT_PATH="lastSuccessfulBuild/artifact/target/BuildTools.jar" | ||||||
|  |  | ||||||
|  | # Consider turning bStats (https://bStats.org) on but I'm turning it off by | ||||||
|  | # default because it collects information | ||||||
|  | ARG BSTATS_ENABLED=false | ||||||
|  |  | ||||||
| # Build in common container location | # Build in common container location | ||||||
| WORKDIR /build | WORKDIR /build | ||||||
|  |  | ||||||
| @@ -108,7 +112,12 @@ COPY --from=build /build/server.jar /app/server.jar | |||||||
| COPY --from=build /plugins/ /app/plugins/ | COPY --from=build /plugins/ /app/plugins/ | ||||||
|  |  | ||||||
| # Generate initial settings | # Generate initial settings | ||||||
| RUN java -jar server.jar --initSettings --nogui | RUN java -jar server.jar --initSettings --nogui && \ | ||||||
|  |   # Disable bStats by default | ||||||
|  |   if [ "$BSTATS_ENABLED" = "false" ]; then \ | ||||||
|  |     mkdir -p /app/plugins/bStats/ && \ | ||||||
|  |     echo "enabled: false" > /app/plugins/bStats/config.yml; \ | ||||||
|  |   fi | ||||||
|  |  | ||||||
| # Back to root to copy the entrypoint in | # Back to root to copy the entrypoint in | ||||||
| USER root | USER root | ||||||
|   | |||||||
| @@ -9,6 +9,10 @@ ARG PREFIX="PLUGIN_" | |||||||
| # PaperMC base URL | # PaperMC base URL | ||||||
| ARG BASE_URL="https://api.papermc.io/v2/projects/paper/versions/${VERSION}" | ARG BASE_URL="https://api.papermc.io/v2/projects/paper/versions/${VERSION}" | ||||||
|  |  | ||||||
|  | # Consider turning bStats (https://bStats.org) on but I'm turning it off by | ||||||
|  | # default because it collects information | ||||||
|  | ARG BSTATS_ENABLED=false | ||||||
|  |  | ||||||
| # Download files | # Download files | ||||||
| USER root | USER root | ||||||
| WORKDIR /app | WORKDIR /app | ||||||
| @@ -95,7 +99,12 @@ RUN set -eux && \ | |||||||
| # Generate initial settings | # Generate initial settings | ||||||
| USER minecraft | USER minecraft | ||||||
| WORKDIR /app | WORKDIR /app | ||||||
| RUN java -jar server.jar --initSettings --nogui | RUN java -jar server.jar --initSettings --nogui && \ | ||||||
|  |   # Disable bStats by default | ||||||
|  |   if [ "$BSTATS_ENABLED" = "false" ]; then \ | ||||||
|  |     mkdir -p /app/plugins/bStats/ && \ | ||||||
|  |     echo "enabled: false" > /app/plugins/bStats/config.yml; \ | ||||||
|  |   fi | ||||||
|  |  | ||||||
| # Back to root to copy the entrypoint in | # Back to root to copy the entrypoint in | ||||||
| USER root | USER root | ||||||
|   | |||||||
| @@ -1,5 +1,5 @@ | |||||||
| #!/bin/bash | #!/bin/bash | ||||||
| set -eux | set -eu | ||||||
|  |  | ||||||
| # Set eula value in eula.txt | # Set eula value in eula.txt | ||||||
| set_eula() { | set_eula() { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user