mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-07-09 18:15:10 +00:00
@@ -796,18 +796,15 @@ The world will only be downloaded or copied if it doesn't exist already. Set `FO
|
|||||||
|
|
||||||
## Server configuration
|
## Server configuration
|
||||||
|
|
||||||
By default the server configuration will be created and set based on the following
|
By default, the server configuration will be created and set based on the following environment variables, but only the first time the server is started. If the `server.properties` file already exists, the values in them will not be changed.
|
||||||
environment variables, but only the first time the server is started. If the
|
|
||||||
`server.properties` file already exists, the values in them will not be changed.
|
|
||||||
|
|
||||||
If you would like to override the server configuration each time the container
|
If you would like to override the server configuration each time the container starts up, you can set the `OVERRIDE_SERVER_PROPERTIES` environment variable like:
|
||||||
starts up, you can set the OVERRIDE_SERVER_PROPERTIES environment variable like:
|
|
||||||
|
|
||||||
docker run -d -e OVERRIDE_SERVER_PROPERTIES=true ...
|
docker run -d -e OVERRIDE_SERVER_PROPERTIES=true ...
|
||||||
|
|
||||||
This will reset any manual configuration of the `server.properties` file, so if
|
This will reset any manual configuration of the `server.properties` file, so if you want to make any persistent configuration changes you will need to make sure you have properly set the proper environment variables in your container configuration.
|
||||||
you want to make any persistent configuration changes you will need to make sure
|
|
||||||
you have properly set the proper environment variables in your docker run command (described below).
|
In the opposite case, you can skip the startup script's creation of `server.properties`, by setting `SKIP_SERVER_PROPERTIES` to "true".
|
||||||
|
|
||||||
### Message of the Day
|
### Message of the Day
|
||||||
|
|
||||||
|
|||||||
@@ -187,21 +187,25 @@ if [[ ${TYPE} == "CURSEFORGE" ]]; then
|
|||||||
log "detected FTB, changing properties path to ${SERVER_PROPERTIES}"
|
log "detected FTB, changing properties path to ${SERVER_PROPERTIES}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -e "$SERVER_PROPERTIES" ]; then
|
if ! isTrue "${SKIP_SERVER_PROPERTIES:-false}"; then
|
||||||
log "Creating server.properties in ${SERVER_PROPERTIES}"
|
if [ ! -e "$SERVER_PROPERTIES" ]; then
|
||||||
cp /tmp/server.properties "$SERVER_PROPERTIES"
|
log "Creating server.properties in ${SERVER_PROPERTIES}"
|
||||||
customizeServerProps
|
cp /tmp/server.properties "$SERVER_PROPERTIES"
|
||||||
elif [ -n "${OVERRIDE_SERVER_PROPERTIES}" ]; then
|
customizeServerProps
|
||||||
case ${OVERRIDE_SERVER_PROPERTIES^^} in
|
elif [ -n "${OVERRIDE_SERVER_PROPERTIES}" ]; then
|
||||||
TRUE|1)
|
case ${OVERRIDE_SERVER_PROPERTIES^^} in
|
||||||
customizeServerProps
|
TRUE|1)
|
||||||
;;
|
customizeServerProps
|
||||||
*)
|
;;
|
||||||
log "server.properties already created, skipping"
|
*)
|
||||||
;;
|
log "server.properties already created, skipping"
|
||||||
esac
|
;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
log "server.properties already created, skipping"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
log "server.properties already created, skipping"
|
log "Skipping setup of server.properties"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if isTrue "${ENABLE_AUTOPAUSE}"; then
|
if isTrue "${ENABLE_AUTOPAUSE}"; then
|
||||||
|
|||||||
Reference in New Issue
Block a user