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

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

No files matched your search

Executable
+18
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