mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-11-07 09:19:21 +00:00
1 parent
9560903c80
commit
8afb1651fd
2 files changed
+20
No files matched your search
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
##### mcstatus shim for mc-monitor
|
||||
|
||||
addr="$1"
|
||||
cmd="$2"
|
||||
|
||||
if [[ ${cmd} == "ping" ]]; then
|
||||
IFS=':'
|
||||
read -a parts <<< "${addr}"
|
||||
if [[ ${#parts[*]} -gt 1 ]]; then
|
||||
echo mc-monitor status --host ${parts[0]} --port ${parts[1]}
|
||||
else
|
||||
echo mc-monitor status --host ${parts[0]}
|
||||
fi
|
||||
else
|
||||
echo "ERROR can only shim the 'ping' command"
|
||||
exit 1
|
||||
fi
|
||||
Reference in new issue
Block a user