mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
e7cc54092a
For #426
19 lines
449 B
Bash
Executable File
19 lines
449 B
Bash
Executable File
#!/bin/bash
|
|
|
|
echo "WARNING: mcstatus is deprecated; calling mc-monitor instead"
|
|
|
|
##### mcstatus shim for mc-monitor
|
|
# handles translating calls to
|
|
# mcstatus (host:port) (command)
|
|
# where the actual command is ignore, but is typically ping or status
|
|
|
|
addr="$1"
|
|
|
|
IFS=':'
|
|
read -a parts <<< "${addr}"
|
|
if [[ ${#parts[*]} -gt 1 ]]; then
|
|
exec mc-monitor status --host ${parts[0]} --port ${parts[1]}
|
|
else
|
|
exec mc-monitor status --host ${parts[0]}
|
|
fi
|