mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
parent
9560903c80
commit
8afb1651fd
@ -45,6 +45,7 @@ ARG MC_RUN_VER=1.3.3
|
|||||||
RUN easy-add --file mc-server-runner --from https://github.com/itzg/mc-server-runner/releases/download/${MC_RUN_VER}/mc-server-runner_${MC_RUN_VER}_linux_${ARCH}.tar.gz
|
RUN easy-add --file mc-server-runner --from https://github.com/itzg/mc-server-runner/releases/download/${MC_RUN_VER}/mc-server-runner_${MC_RUN_VER}_linux_${ARCH}.tar.gz
|
||||||
|
|
||||||
COPY mcadmin.jq /usr/share
|
COPY mcadmin.jq /usr/share
|
||||||
|
COPY mcstatus /usr/local/bin
|
||||||
|
|
||||||
VOLUME ["/data","/mods","/config"]
|
VOLUME ["/data","/mods","/config"]
|
||||||
COPY server.properties /tmp/server.properties
|
COPY server.properties /tmp/server.properties
|
||||||
|
19
mcstatus
Executable file
19
mcstatus
Executable file
@ -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
|
Loading…
Reference in New Issue
Block a user