Skip to content

Commit 796f2fe

Browse files
authored
Add support for rcon password from file (itzg#585)
1 parent 4fef391 commit 796f2fe

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

start-configuration

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,22 @@ if [[ $PROXY ]]; then
4545
sleep 5
4646
fi
4747

48+
if [[ $RCON_PASSWORD_FILE ]]; then
49+
log ""
50+
if [ ! -e ${RCON_PASSWORD_FILE} ]; then
51+
log "Initial RCON password file ${RCON_PASSWORD_FILE} does not seems to exist."
52+
log "Please ensure your configuration."
53+
log "If you are using Docker Secrets feature, please check this for further information: "
54+
log " https://docs.docker.com/engine/swarm/secrets"
55+
log ""
56+
exit 1
57+
else
58+
RCON_PASSWORD=$(cat ${RCON_PASSWORD_FILE})
59+
export RCON_PASSWORD
60+
fi
61+
log ""
62+
fi
63+
4864
export SERVER_PROPERTIES=/data/server.properties
4965
export VERSIONS_JSON=https://launchermeta.mojang.com/mc/game/version_manifest.json
5066

0 commit comments

Comments
 (0)