allow env in motd
This commit is contained in:
parent
f642050104
commit
7fe09ebba9
2 changed files with 3 additions and 1 deletions
|
@ -16,6 +16,7 @@ RUN go install github.com/a8m/envsubst/cmd/envsubst@latest
|
||||||
|
|
||||||
FROM base AS package
|
FROM base AS package
|
||||||
ARG MINECRAFT_VERSION="1.20.6"
|
ARG MINECRAFT_VERSION="1.20.6"
|
||||||
|
ENV MINECRAFT_VERSION $MINECRAFT_VERSION
|
||||||
|
|
||||||
RUN apk add --no-cache --upgrade rcon eudev-libs
|
RUN apk add --no-cache --upgrade rcon eudev-libs
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
export MINECRAFT_VERSION=SED_VERSION
|
# add environment variables to motd
|
||||||
|
export MC_MOTD=$(echo $MC_MOTD | envsubst)
|
||||||
|
|
||||||
cleanup() {
|
cleanup() {
|
||||||
rcon -m -p 25575 --host localhost --password "${MC_RCON_PASSWORD}" say Warning! Server is shutting down in 5 seconds...
|
rcon -m -p 25575 --host localhost --password "${MC_RCON_PASSWORD}" say Warning! Server is shutting down in 5 seconds...
|
||||||
|
|
Loading…
Add table
Reference in a new issue