mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-11-21 14:32:39 +00:00
Add purpur support for ServerLibraryCleaner (#4133)
This commit is contained in:
1 parent
d9bf26cc17
commit
82043d556e
2 files changed
+18
-6
No files matched your search
@@ -26,7 +26,10 @@ docker run -d --pull=always \
|
|||||||
|
|
||||||
By default, supported server types remove stale server libraries during installation by setting `CLEAN_SERVER_LIBRARIES` to `true`. Set `CLEAN_SERVER_LIBRARIES` to `false` to disable this cleanup if it causes unexpected behavior.
|
By default, supported server types remove stale server libraries during installation by setting `CLEAN_SERVER_LIBRARIES` to `true`. Set `CLEAN_SERVER_LIBRARIES` to `false` to disable this cleanup if it causes unexpected behavior.
|
||||||
|
|
||||||
Currently, library cleanup is supported by `TYPE=PAPER`. Other server jar types are not yet supported.
|
Currently, library cleanup is supported by
|
||||||
|
|
||||||
|
- `TYPE=PAPER`
|
||||||
|
- `TYPE=PURPUR`
|
||||||
|
|
||||||
## Running as alternate user/group ID
|
## Running as alternate user/group ID
|
||||||
|
|
||||||
@@ -244,4 +247,4 @@ To also include the timestamp with each log, set `LOG_TIMESTAMP` to "true". The
|
|||||||
|
|
||||||
```
|
```
|
||||||
[init] 2022-02-05 16:58:33+00:00 Starting the Minecraft server...
|
[init] 2022-02-05 16:58:33+00:00 Starting the Minecraft server...
|
||||||
```
|
```
|
||||||
@@ -5,6 +5,7 @@ IFS=$'\n\t'
|
|||||||
: "${PURPUR_BUILD:=LATEST}"
|
: "${PURPUR_BUILD:=LATEST}"
|
||||||
: "${PURPUR_DOWNLOAD_URL:=}"
|
: "${PURPUR_DOWNLOAD_URL:=}"
|
||||||
: "${PURPUR_CONFIG_REPO:=}"
|
: "${PURPUR_CONFIG_REPO:=}"
|
||||||
|
: "${CLEAN_SERVER_LIBRARIES:=true}"
|
||||||
|
|
||||||
# shellcheck source=start-utils
|
# shellcheck source=start-utils
|
||||||
. "$(dirname "$0")/start-utils"
|
. "$(dirname "$0")/start-utils"
|
||||||
@@ -13,10 +14,15 @@ isDebugging && set -x
|
|||||||
resultsFile=/data/.purpur.env
|
resultsFile=/data/.purpur.env
|
||||||
|
|
||||||
if [[ $PURPUR_DOWNLOAD_URL ]]; then
|
if [[ $PURPUR_DOWNLOAD_URL ]]; then
|
||||||
if ! mc-image-helper install-purpur \
|
args=(
|
||||||
--output-directory=/data \
|
--output-directory=/data
|
||||||
--results-file="$resultsFile" \
|
--results-file="$resultsFile"
|
||||||
--url="${PURPUR_DOWNLOAD_URL}"; then
|
--url="${PURPUR_DOWNLOAD_URL}"
|
||||||
|
)
|
||||||
|
if isTrue "$CLEAN_SERVER_LIBRARIES"; then
|
||||||
|
args+=(--clean-libraries)
|
||||||
|
fi
|
||||||
|
if ! mc-image-helper install-purpur "${args[@]}"; then
|
||||||
logError "Failed to download from custom Purpur URL"
|
logError "Failed to download from custom Purpur URL"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -29,6 +35,9 @@ else
|
|||||||
if [[ $PURPUR_BUILD ]]; then
|
if [[ $PURPUR_BUILD ]]; then
|
||||||
args+=(--build="$PURPUR_BUILD")
|
args+=(--build="$PURPUR_BUILD")
|
||||||
fi
|
fi
|
||||||
|
if isTrue "$CLEAN_SERVER_LIBRARIES"; then
|
||||||
|
args+=(--clean-libraries)
|
||||||
|
fi
|
||||||
if ! mc-image-helper install-purpur "${args[@]}"; then
|
if ! mc-image-helper install-purpur "${args[@]}"; then
|
||||||
logError "Failed to download Purpur"
|
logError "Failed to download Purpur"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in new issue
Block a user