mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-09-02 20:27:14 +00:00
fixed logic to not compare the VERSION number when VERSION is set to … (#3389)
This commit is contained in:
@@ -25,11 +25,17 @@ use_proxy() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
use_server_list_ping() {
|
use_server_list_ping() {
|
||||||
|
if [[ "${VERSION^^}" == "LATEST" || "${VERSION^^}" == "SNAPSHOT" ]]; then
|
||||||
|
# Don't use server-list ping for unknown version
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
if versionLessThan 1.7; then
|
if versionLessThan 1.7; then
|
||||||
echo "--use-server-list-ping"
|
echo "--use-server-list-ping"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
mc_server_listening() {
|
mc_server_listening() {
|
||||||
mc-monitor status $(use_proxy) --host "${SERVER_HOST:-localhost}" --port "$SERVER_PORT" $(use_server_list_ping) --timeout 10s >&/dev/null
|
mc-monitor status $(use_proxy) --host "${SERVER_HOST:-localhost}" --port "$SERVER_PORT" $(use_server_list_ping) --timeout 10s >&/dev/null
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user