mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-12-13 13:52:27 +00:00
88ed017ca7
Fixes #426
16 lines
381 B
Bash
Executable file
16 lines
381 B
Bash
Executable file
#!/bin/bash
|
|
|
|
##### 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
|