mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-18 15:36:22 +00:00
53 lines
1.1 KiB
Bash
53 lines
1.1 KiB
Bash
#!/bin/bash
|
|
set -euo pipefail
|
|
IFS=$'\n\t'
|
|
|
|
# shellcheck source=start-utils
|
|
. "${SCRIPTS:-/}start-utils"
|
|
isDebugging && set -x
|
|
|
|
sharedArgs=(--version="$VERSION")
|
|
if isFalse "${ONLINE_MODE:-true}"; then
|
|
sharedArgs+=( --offline )
|
|
fi
|
|
|
|
if [[ -v OPS_FILE ]]; then
|
|
mc-image-helper manage-users \
|
|
"${sharedArgs[@]}" \
|
|
--type=JAVA_OPS \
|
|
--input-is-file \
|
|
"$OPS_FILE"
|
|
fi
|
|
if [[ -v OPS ]]; then
|
|
args=()
|
|
if isTrue "${APPEND_OPS:-false}" || isFalse "${OVERRIDE_OPS:-true}"; then
|
|
args+=(--append-only)
|
|
fi
|
|
# shellcheck disable=SC2086
|
|
mc-image-helper manage-users \
|
|
"${sharedArgs[@]}" "${args[@]}" \
|
|
--type=JAVA_OPS \
|
|
$OPS
|
|
fi
|
|
|
|
if [[ -v WHITELIST_FILE ]]; then
|
|
mc-image-helper manage-users \
|
|
"${sharedArgs[@]}" \
|
|
--type=JAVA_WHITELIST \
|
|
--input-is-file \
|
|
"$WHITELIST_FILE"
|
|
fi
|
|
if [[ -v WHITELIST ]]; then
|
|
args=()
|
|
if isTrue "${APPEND_WHITELIST:-false}" || isFalse "${OVERRIDE_WHITELIST:-true}"; then
|
|
args+=(--append-only)
|
|
fi
|
|
# shellcheck disable=SC2086
|
|
mc-image-helper manage-users \
|
|
"${sharedArgs[@]}" "${args[@]}" \
|
|
--type=JAVA_WHITELIST \
|
|
$WHITELIST
|
|
fi
|
|
|
|
exec "${SCRIPTS:-/}start-finalExec" "$@"
|