mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
Fixed bug causing isTrue to fail (#1727)
This commit is contained in:
parent
fabe14db49
commit
a1e4657e62
|
@ -1,5 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
: "${DEBUG_EXEC:=false}"
|
||||
: "${SETUP_ONLY:=false}"
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
isDebugging && set -x
|
||||
|
@ -234,7 +237,7 @@ if [[ ${TYPE} == "CURSEFORGE" && "${SERVER}" ]]; then
|
|||
|
||||
cd "${FTB_DIR}" || (log "ERROR: can't go into ${FTB_DIR}"; exit 1)
|
||||
log "Starting CurseForge server in ${FTB_DIR}..."
|
||||
if isTrue ${DEBUG_EXEC}; then
|
||||
if isTrue "${DEBUG_EXEC}"; then
|
||||
set -x
|
||||
fi
|
||||
exec mc-server-runner ${bootstrapArgs} "${mcServerRunnerArgs[@]}" java $JVM_XX_OPTS $JVM_OPTS $expandedDOpts -jar "$(basename "${SERVER}")" "$@" $EXTRA_ARGS
|
||||
|
@ -259,15 +262,15 @@ EOF
|
|||
|
||||
finalArgs="${FTB_SERVER_START}"
|
||||
|
||||
if isTrue "${SETUP_ONLY:=false}"; then
|
||||
if isTrue "${SETUP_ONLY}"; then
|
||||
echo "SETUP_ONLY: ${finalArgs}"
|
||||
exit
|
||||
fi
|
||||
|
||||
if isTrue ${DEBUG_EXEC}; then
|
||||
if isTrue "${DEBUG_EXEC}"; then
|
||||
set -x
|
||||
fi
|
||||
if isTrue ${EXEC_DIRECTLY:-false}; then
|
||||
if isTrue "${EXEC_DIRECTLY:-false}"; then
|
||||
"${finalArgs[@]}"
|
||||
else
|
||||
exec mc-server-runner "${mcServerRunnerArgs[@]}" "${finalArgs[@]}"
|
||||
|
@ -275,7 +278,7 @@ EOF
|
|||
elif [[ $SERVER =~ run.sh ]]; then
|
||||
log "Using Forge supplied run.sh script..."
|
||||
echo $JVM_XX_OPTS $JVM_OPTS $expandedDOpts > user_jvm_args.txt
|
||||
if isTrue ${SETUP_ONLY:=false}; then
|
||||
if isTrue ${SETUP_ONLY}; then
|
||||
echo "SETUP_ONLY: bash ${SERVER}"
|
||||
exit
|
||||
fi
|
||||
|
@ -296,7 +299,7 @@ else
|
|||
"$@" $EXTRA_ARGS
|
||||
)
|
||||
|
||||
if isTrue ${SETUP_ONLY:=false}; then
|
||||
if isTrue ${SETUP_ONLY}; then
|
||||
echo "SETUP_ONLY: java ${finalArgs[*]}"
|
||||
exit
|
||||
fi
|
||||
|
|
|
@ -63,8 +63,7 @@ function getFilenameFromUrl() {
|
|||
}
|
||||
|
||||
function isTrue() {
|
||||
local arg="${1?}"
|
||||
case ${arg,,} in
|
||||
case "${1,,}" in
|
||||
true | on | 1)
|
||||
return 0
|
||||
;;
|
||||
|
@ -75,8 +74,7 @@ function isTrue() {
|
|||
}
|
||||
|
||||
function isFalse() {
|
||||
local arg="${1?}"
|
||||
case ${arg,,} in
|
||||
case "${1,,}" in
|
||||
false | off | 0)
|
||||
return 0
|
||||
;;
|
||||
|
|
Loading…
Reference in New Issue
Block a user