From 9296301e6f4163dabf87d0ae2792fb537a1ebfe6 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sat, 8 Oct 2022 14:55:40 -0500 Subject: [PATCH 1/2] Auto-manage server properties by default --- README.md | 8 +------- scripts/start-setupServerProperties | 18 ++++++------------ 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index c44a035c1a5..a534e0cd81f 100644 --- a/README.md +++ b/README.md @@ -960,13 +960,7 @@ CraftingTweaks Json: By default, the server configuration will be created and set based on the following environment variables, but only the first time the server is started. If the `server.properties` file already exists, the values in them will not be changed. -If you would like to override the server configuration each time the container starts up, you can set the `OVERRIDE_SERVER_PROPERTIES` environment variable like: - - docker run -d -e OVERRIDE_SERVER_PROPERTIES=true ... - -This will reset any manual configuration of the `server.properties` file, so if you want to make any persistent configuration changes you will need to make sure you have properly set the proper environment variables in your container configuration. - -In the opposite case, you can skip the startup script's creation of `server.properties`, by setting `SKIP_SERVER_PROPERTIES` to "true". +If you prefer to manually manage the `server.properties` file, set `OVERRIDE_SERVER_PROPERTIES` to "false". Similarly, you can entirely skip the startup script's creation of `server.properties` by setting `SKIP_SERVER_PROPERTIES` to "true". > NOTE: to clear a server property, set the variable to an empty string, such as `-e RESOURCE_PACK=""`. A variables that maps to a server property that is unset, is ignored and the existing `server.property` is left unchanged. diff --git a/scripts/start-setupServerProperties b/scripts/start-setupServerProperties index bdd6ac6e39e..427f7390b36 100755 --- a/scripts/start-setupServerProperties +++ b/scripts/start-setupServerProperties @@ -5,6 +5,8 @@ : "${SERVER_PROPERTIES:=/data/server.properties}" : "${ENABLE_RCON:=true}" +: "${OVERRIDE_SERVER_PROPERTIES:=true}" +: "${SKIP_SERVER_PROPERTIES:=false}" # FUNCTIONS function setServerPropValue { @@ -208,22 +210,14 @@ if [[ ${TYPE} == "CURSEFORGE" ]]; then log "detected FTB, changing properties path to ${SERVER_PROPERTIES}" fi -if ! isTrue "${SKIP_SERVER_PROPERTIES:-false}"; then +if ! isTrue "${SKIP_SERVER_PROPERTIES}"; then if [ ! -e "$SERVER_PROPERTIES" ]; then log "Creating server properties in ${SERVER_PROPERTIES}" customizeServerProps - elif [ -n "${OVERRIDE_SERVER_PROPERTIES}" ]; then - case ${OVERRIDE_SERVER_PROPERTIES^^} in - TRUE|1) - log "Updating server properties in ${SERVER_PROPERTIES}" - customizeServerProps - ;; - *) - log "server.properties already created, skipping" - ;; - esac + elif isTrue "${OVERRIDE_SERVER_PROPERTIES}"; then + customizeServerProps else - log "server.properties already created, skipping" + log "server.properties already created and managed manually" fi else log "Skipping setup of server.properties" From 651bcef8cdbc8443aa520f1addf8e53d280a729c Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sat, 8 Oct 2022 18:09:50 -0500 Subject: [PATCH 2/2] Added categories to release config --- .github/release.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/release.yml b/.github/release.yml index ddb3e480f29..31694f9ebd5 100644 --- a/.github/release.yml +++ b/.github/release.yml @@ -2,3 +2,16 @@ changelog: exclude: authors: - dependabot + categories: + - title: Enhancements + labels: + - enhancement + - title: Bug Fixes + labels: + - bug + - title: Documentation + labels: + - documentation + - title: Other Changes + labels: + - "*"