Added mc-send-to-console as rcon/attach alternative

#1071
This commit is contained in:
Geoff Bourne
2021-10-09 11:34:37 -05:00
parent 1d41593a84
commit c3cf892e40
6 changed files with 49 additions and 27 deletions

18
bin/mcstatus Executable file
View File

@@ -0,0 +1,18 @@
#!/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