mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-09-07 06:27:58 +00:00
Compare commits
3
Commits
8b076e4868
...
292b2f757e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
292b2f757e | ||
|
|
82043d556e | ||
|
|
d9bf26cc17 |
@@ -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.
|
||||
|
||||
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
|
||||
|
||||
@@ -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...
|
||||
```
|
||||
```
|
||||
|
||||
@@ -31,7 +31,7 @@ function getGTNHdownloadPath(){
|
||||
else
|
||||
if ! release_object="$(
|
||||
curl -fsSL "https://downloads.gtnewhorizons.com/versions.json" \
|
||||
| jq -r --arg USRIN $GTNH_PACK_VERSION '.versions|to_entries|sort_by(.value.releaseDate)|map(select(.key==$USRIN))|.[]'
|
||||
| jq -r --arg USRIN "$GTNH_PACK_VERSION" '.versions|to_entries|sort_by(.value.releaseDate)|map(select(.key==$USRIN))|.[]'
|
||||
)"; then logError "Failed to retrieve release from https://downloads.gtnewhorizons.com/versions.json"
|
||||
exit 1
|
||||
fi
|
||||
@@ -160,7 +160,7 @@ function handleGTNH() {
|
||||
deleteGTNHbackup
|
||||
fi
|
||||
|
||||
if [[ -n $GTNH_PACK_VERSION ]] && isFalse "$SKIP_GTNH_UPDATE_CHECK" ; then
|
||||
if [[ -n "$GTNH_PACK_VERSION" ]] && isFalse "$SKIP_GTNH_UPDATE_CHECK" ; then
|
||||
|
||||
getGTNHdownloadPath
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ elif [[ $PAPER_DOWNLOAD_URL ]]; then
|
||||
--url="$PAPER_DOWNLOAD_URL"
|
||||
)
|
||||
|
||||
if [[ $CLEAN_SERVER_LIBRARIES ]]; then
|
||||
if isTrue $CLEAN_SERVER_LIBRARIES; then
|
||||
args+=(--clean-libraries)
|
||||
fi
|
||||
|
||||
@@ -45,7 +45,7 @@ else
|
||||
args+=(--build="$PAPER_BUILD")
|
||||
fi
|
||||
|
||||
if [[ $CLEAN_SERVER_LIBRARIES ]]; then
|
||||
if isTrue $CLEAN_SERVER_LIBRARIES; then
|
||||
args+=(--clean-libraries)
|
||||
fi
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ IFS=$'\n\t'
|
||||
: "${PURPUR_BUILD:=LATEST}"
|
||||
: "${PURPUR_DOWNLOAD_URL:=}"
|
||||
: "${PURPUR_CONFIG_REPO:=}"
|
||||
: "${CLEAN_SERVER_LIBRARIES:=true}"
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "$(dirname "$0")/start-utils"
|
||||
@@ -13,10 +14,15 @@ isDebugging && set -x
|
||||
resultsFile=/data/.purpur.env
|
||||
|
||||
if [[ $PURPUR_DOWNLOAD_URL ]]; then
|
||||
if ! mc-image-helper install-purpur \
|
||||
--output-directory=/data \
|
||||
--results-file="$resultsFile" \
|
||||
--url="${PURPUR_DOWNLOAD_URL}"; then
|
||||
args=(
|
||||
--output-directory=/data
|
||||
--results-file="$resultsFile"
|
||||
--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"
|
||||
exit 1
|
||||
fi
|
||||
@@ -29,6 +35,9 @@ else
|
||||
if [[ $PURPUR_BUILD ]]; then
|
||||
args+=(--build="$PURPUR_BUILD")
|
||||
fi
|
||||
if isTrue "$CLEAN_SERVER_LIBRARIES"; then
|
||||
args+=(--clean-libraries)
|
||||
fi
|
||||
if ! mc-image-helper install-purpur "${args[@]}"; then
|
||||
logError "Failed to download Purpur"
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user