Compare commits

..

8 Commits

Author SHA1 Message Date
Geoff Bourne
4149db7f11 Auto-merging via docker-versions-create 2021-11-04 21:08:06 -05:00
Geoff Bourne
666f538ad5 Auto-merging via docker-versions-create 2021-10-31 09:49:21 -05:00
Geoff Bourne
145403ea54 Merge branch 'master' into java17 2021-10-27 21:28:49 -05:00
Geoff Bourne
5392801ecd Auto-merging via docker-versions-create 2021-10-25 19:26:48 -05:00
Geoff Bourne
3dfd70d068 Auto-merging via docker-versions-create 2021-10-24 20:31:59 -05:00
Geoff Bourne
e5bc9b939f Auto-merging via docker-versions-create 2021-10-23 09:47:31 -05:00
Geoff Bourne
1b620d2d6d Auto-merging via docker-versions-create 2021-10-22 15:57:41 -05:00
Geoff Bourne
28d77853cb Added java17 variant
#1054
2021-10-19 21:34:02 -05:00
15 changed files with 121 additions and 137 deletions

View File

@@ -24,17 +24,9 @@ body:
attributes: attributes:
label: Container definition label: Container definition
description: Please provide the compose file or run command used to create the container description: Please provide the compose file or run command used to create the container
value: |
```
Paste run command or compose file here
```
- type: textarea - type: textarea
id: logs id: logs
attributes: attributes:
label: Container logs label: Container logs
description: | description: |
Please provide container logs from the start of the container, which will be the ones prefixed with `[init]`. It is even better if you can set the variable `DEBUG` to "true" and provide those debug container logs. Please provide container logs from the start of the container, which will be the ones prefixed with `[init]`. It is even better if you can set the variable `DEBUG` to "true" and provide those debug container logs.
value: |
```
Paste logs here
```

View File

@@ -1,7 +0,0 @@
contact_links:
- name: Ask a question in discussions
url: https://github.com/itzg/docker-minecraft-server/discussions
about: Please ask questions here
- name: Ask a question on Discord
url: https://discord.gg/DXfKpjB
about: Please ask questions here

View File

@@ -26,7 +26,7 @@ jobs:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2.4.0 uses: actions/checkout@v2.3.5
- name: Docker meta - name: Docker meta
id: meta id: meta

View File

@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 5 timeout-minutes: 5
steps: steps:
- uses: actions/checkout@v2.4.0 - uses: actions/checkout@v2.3.5
- run: | - run: |
curl https://raw.githubusercontent.com/ekalinin/github-markdown-toc/master/gh-md-toc -o gh-md-toc curl https://raw.githubusercontent.com/ekalinin/github-markdown-toc/master/gh-md-toc -o gh-md-toc
chmod a+x gh-md-toc chmod a+x gh-md-toc

View File

@@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@v2.4.0 - uses: actions/checkout@v2.3.5
- name: Run tests - name: Run tests
run: | run: |
@@ -31,7 +31,7 @@ jobs:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@v2.4.0 - uses: actions/checkout@v2.3.5
- name: Prepare - name: Prepare
id: prep id: prep

View File

@@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2.4.0 - uses: actions/checkout@v2.3.5
- name: Run tests - name: Run tests
run: | run: |

View File

@@ -1,4 +1,4 @@
FROM eclipse-temurin:8-jdk FROM eclipse-temurin:17-jdk
LABEL org.opencontainers.image.authors="Geoff Bourne <itzgeoff@gmail.com>" LABEL org.opencontainers.image.authors="Geoff Bourne <itzgeoff@gmail.com>"
@@ -75,6 +75,7 @@ ENV UID=1000 GID=1000 \
MEMORY="1G" \ MEMORY="1G" \
TYPE=VANILLA VERSION=LATEST \ TYPE=VANILLA VERSION=LATEST \
ENABLE_RCON=true RCON_PORT=25575 RCON_PASSWORD=minecraft \ ENABLE_RCON=true RCON_PORT=25575 RCON_PASSWORD=minecraft \
SERVER_PORT=25565 ONLINE_MODE=TRUE SERVER_NAME="Dedicated Server" \
ENABLE_AUTOPAUSE=false AUTOPAUSE_TIMEOUT_EST=3600 AUTOPAUSE_TIMEOUT_KN=120 AUTOPAUSE_TIMEOUT_INIT=600 \ ENABLE_AUTOPAUSE=false AUTOPAUSE_TIMEOUT_EST=3600 AUTOPAUSE_TIMEOUT_KN=120 AUTOPAUSE_TIMEOUT_INIT=600 \
AUTOPAUSE_PERIOD=10 AUTOPAUSE_KNOCK_INTERFACE=eth0 AUTOPAUSE_PERIOD=10 AUTOPAUSE_KNOCK_INTERFACE=eth0

View File

@@ -133,7 +133,7 @@ By default, the container will download the latest version of the "vanilla" [Min
* [Running on RaspberryPi](#running-on-raspberrypi) * [Running on RaspberryPi](#running-on-raspberrypi)
* [Contributing](#contributing) * [Contributing](#contributing)
<!-- Added by: runner, at: Tue Nov 16 02:46:53 UTC 2021 --> <!-- Added by: runner, at: Fri Nov 5 02:00:06 UTC 2021 -->
<!--te--> <!--te-->
@@ -567,6 +567,8 @@ docker run -d -v /path/on/host:/data ... \
-e FABRIC_LOADER_VERSION=0.11.7 -e FABRIC_LOADER_VERSION=0.11.7
``` ```
In order to add mods, you have two options:
### Running a Limbo server ### Running a Limbo server
A [Limbo](https://github.com/LOOHP/Limbo) server can be run by setting `TYPE` to `LIMBO`. A [Limbo](https://github.com/LOOHP/Limbo) server can be run by setting `TYPE` to `LIMBO`.
@@ -806,8 +808,6 @@ This will reset any manual configuration of the `server.properties` file, so if
In the opposite case, you can skip the startup script's creation of `server.properties`, by setting `SKIP_SERVER_PROPERTIES` to "true". In the opposite case, you can skip the startup script's creation of `server.properties`, by setting `SKIP_SERVER_PROPERTIES` to "true".
> NOTE: to clear a server property, set the variable to an empty string, such as `-e RESOURCE_PACK=""`. A variables that maps to a server property that is unset, is ignored and the existing `server.property` is left unchanged.
### Message of the Day ### Message of the Day
The message of the day, shown below each server entry in the client UI, can be changed with the `MOTD` environment variable, such as The message of the day, shown below each server entry in the client UI, can be changed with the `MOTD` environment variable, such as
@@ -875,7 +875,6 @@ The server icon which has been set doesn't get overridden by default. It can be
### Rcon ### Rcon
To use rcon use the `ENABLE_RCON` and `RCON_PASSWORD` variables. To use rcon use the `ENABLE_RCON` and `RCON_PASSWORD` variables.
The default RCON password is _"minecraft",_ but it's **highly** recommended to override that.
By default rcon port will be `25575` but can easily be changed with the `RCON_PORT` variable. By default rcon port will be `25575` but can easily be changed with the `RCON_PORT` variable.
docker run -d -e ENABLE_RCON=true -e RCON_PASSWORD=testing docker run -d -e ENABLE_RCON=true -e RCON_PASSWORD=testing

View File

@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# shellcheck source=../scripts/start-utils # shellcheck source=../start-utils
. "${SCRIPTS:-/}start-utils" . ${SCRIPTS:-/}start-utils
if isTrue "${DISABLE_HEALTHCHECK}"; then if isTrue "${DISABLE_HEALTHCHECK}"; then
echo "Healthcheck disabled" echo "Healthcheck disabled"
@@ -10,6 +10,6 @@ elif isTrue "${ENABLE_AUTOPAUSE}" && [[ "$( ps -ax -o stat,comm | grep 'java' |
echo "Java process suspended by Autopause function" echo "Java process suspended by Autopause function"
exit 0 exit 0
else else
mc-monitor status --host localhost --port "${SERVER_PORT:-25565}" mc-monitor status --host localhost --port $SERVER_PORT
exit $? exit $?
fi fi

View File

@@ -4,7 +4,7 @@
<Console name="SysOut" target="SYSTEM_OUT"> <Console name="SysOut" target="SYSTEM_OUT">
<PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level]: %msg%n" /> <PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level]: %msg%n" />
</Console> </Console>
<Queue name="TerminalConsole"> <Queue name="ServerGuiConsole">
<PatternLayout pattern="[%d{HH:mm:ss} %level]: %msg%n" /> <PatternLayout pattern="[%d{HH:mm:ss} %level]: %msg%n" />
</Queue> </Queue>
<RollingRandomAccessFile name="File" fileName="logs/latest.log" filePattern="logs/%d{yyyy-MM-dd}-%i.log.gz"> <RollingRandomAccessFile name="File" fileName="logs/latest.log" filePattern="logs/%d{yyyy-MM-dd}-%i.log.gz">
@@ -28,7 +28,7 @@
</filters> </filters>
<AppenderRef ref="SysOut"/> <AppenderRef ref="SysOut"/>
<AppenderRef ref="File"/> <AppenderRef ref="File"/>
<AppenderRef ref="TerminalConsole"/> <AppenderRef ref="ServerGuiConsole"/>
</Root> </Root>
</Loggers> </Loggers>
</Configuration> </Configuration>

View File

@@ -1,15 +1,9 @@
#!/bin/bash #!/bin/bash
# shellcheck source=start-utils . ${SCRIPTS:-/}start-utils
. "${SCRIPTS:-/}start-utils"
: "${SERVER_PORT:=25565}"
export SERVER_PORT
log "Autopause functionality enabled" log "Autopause functionality enabled"
isDebugging && set -x
cp /autopause/knockd-config.cfg /tmp/knockd-config.cfg cp /autopause/knockd-config.cfg /tmp/knockd-config.cfg
# update server port to listen to # update server port to listen to

View File

@@ -103,6 +103,14 @@ case "${TYPE^^}" in
;; ;;
FORGE) FORGE)
if versionLessThan 1.17; then
log "**********************************************************************"
log "WARNING: The image tag itzg/minecraft-server:java8 is recommended"
log " since some mods require Java 8"
log " Exception traces reporting ClassCastException: class jdk.internal.loader.ClassLoaders\$AppClassLoader"
log " can be fixed with java8"
log "**********************************************************************"
fi
exec ${SCRIPTS:-/}start-deployForge "$@" exec ${SCRIPTS:-/}start-deployForge "$@"
;; ;;
@@ -115,6 +123,10 @@ case "${TYPE^^}" in
;; ;;
FTB|CURSEFORGE) FTB|CURSEFORGE)
log "**********************************************************************"
log "NOTE: Some mods and modpacks may require Java 8."
log " If so, use itzg/minecraft-server:java8"
log "**********************************************************************"
exec ${SCRIPTS:-/}start-deployCF "$@" exec ${SCRIPTS:-/}start-deployCF "$@"
;; ;;
@@ -159,6 +171,12 @@ case "${TYPE^^}" in
;; ;;
CRUCIBLE) CRUCIBLE)
log "**********************************************************************"
log "WARNING: The image tag itzg/minecraft-server:java8 is recommended"
log " since some mods require Java 8"
log " Exception traces reporting ClassCastException: class jdk.internal.loader.ClassLoaders\$AppClassLoader"
log " can be fixed with java8"
log "**********************************************************************"
exec "${SCRIPTS:-/}start-deployCrucible" "$@" exec "${SCRIPTS:-/}start-deployCrucible" "$@"
;; ;;

View File

@@ -41,16 +41,6 @@ if [ ! -e "$SERVER" ] || [ -n "$FORCE_REDOWNLOAD" ]; then
fi fi
fi fi
if versionLessThan 1.6; then
if ! [[ -L /data/minecraft_server.jar && /data/minecraft_server.jar -ef "/data/$SERVER" ]]; then
rm -f /data/minecraft_server.jar
ln -s "/data/$SERVER" /data/minecraft_server.jar
fi
SERVER=minecraft_server.jar
elif [[ -L /data/minecraft_server.jar ]]; then
rm -f /data/minecraft_server.jar
fi
isDebugging && ls -l isDebugging && ls -l
exec "${SCRIPTS:-/}start-setupWorld" "$@" exec "${SCRIPTS:-/}start-setupWorld" "$@"

View File

@@ -1,46 +1,40 @@
#!/bin/bash #!/bin/bash
# shellcheck source=start-utils . ${SCRIPTS:-/}start-utils
. "${SCRIPTS:-/}start-utils"
: "${SERVER_PROPERTIES:=/data/server.properties}" : ${SERVER_PROPERTIES:=/data/server.properties}
# FUNCTIONS # FUNCTIONS
function setServerPropValue {
local prop=$1
local value=$2
# normalize booleans
case ${value^^} in
TRUE|FALSE)
value=${value,,} ;;
esac
if grep "${prop}" "$SERVER_PROPERTIES" > /dev/null; then
log "Setting ${prop} to '${value}' in ${SERVER_PROPERTIES}"
sed -i "/^${prop}\s*=/ c ${prop}=${value//\\/\\\\}" "$SERVER_PROPERTIES"
else
log "Adding ${prop} with '${value}' in ${SERVER_PROPERTIES}"
echo "${prop}=${value}" >> "$SERVER_PROPERTIES"
fi
}
function setServerProp { function setServerProp {
local prop=$1 local prop=$1
local varName=$2 local var=$2
if [ -n "$var" ]; then
if [ -v $varName ]; then # normalize booleans
setServerPropValue "$prop" "${!varName}" case ${var^^} in
TRUE|FALSE)
var=${var,,} ;;
esac
if grep "${prop}" "$SERVER_PROPERTIES" > /dev/null; then
log "Setting ${prop} to '${var}' in ${SERVER_PROPERTIES}"
sed -i "/^${prop}\s*=/ c ${prop}=${var//\\/\\\\}" "$SERVER_PROPERTIES"
else
log "Adding ${prop} with '${var}' in ${SERVER_PROPERTIES}"
echo "${prop}=${var}" >> "$SERVER_PROPERTIES"
fi
else
isDebugging && log "Skip setting ${prop}"
fi fi
} }
function customizeServerProps { function customizeServerProps {
if [ -n "$WHITELIST" ] || isTrue "${ENABLE_WHITELIST:-false}"; then if [ -n "$WHITELIST" ] || isTrue ${ENABLE_WHITELIST:-false}; then
log "Creating whitelist" log "Creating whitelist"
setServerPropValue "whitelist" "true" setServerProp "whitelist" "true"
setServerPropValue "white-list" "true" setServerProp "white-list" "true"
else else
log "Disabling whitelist" log "Disabling whitelist"
setServerPropValue "whitelist" "false" setServerProp "whitelist" "false"
setServerPropValue "white-list" "false" setServerProp "white-list" "false"
fi fi
# If not provided, generate a reasonable default message-of-the-day, # If not provided, generate a reasonable default message-of-the-day,
@@ -59,57 +53,57 @@ function customizeServerProps {
MOTD="A ${label} Minecraft Server powered by Docker" MOTD="A ${label} Minecraft Server powered by Docker"
fi fi
setServerProp "server-name" SERVER_NAME setServerProp "server-name" "$SERVER_NAME"
setServerProp "server-ip" SERVER_IP setServerProp "server-ip" "$SERVER_IP"
setServerProp "server-port" SERVER_PORT setServerProp "server-port" "$SERVER_PORT"
setServerProp "allow-nether" ALLOW_NETHER setServerProp "motd" "$(echo $MOTD | mc-image-helper asciify)"
setServerProp "announce-player-achievements" ANNOUNCE_PLAYER_ACHIEVEMENTS setServerProp "allow-nether" "$ALLOW_NETHER"
setServerProp "enable-command-block" ENABLE_COMMAND_BLOCK setServerProp "announce-player-achievements" "$ANNOUNCE_PLAYER_ACHIEVEMENTS"
setServerProp "spawn-animals" SPAWN_ANIMALS setServerProp "enable-command-block" "$ENABLE_COMMAND_BLOCK"
setServerProp "spawn-monsters" SPAWN_MONSTERS setServerProp "spawn-animals" "$SPAWN_ANIMALS"
setServerProp "spawn-npcs" SPAWN_NPCS setServerProp "spawn-monsters" "$SPAWN_MONSTERS"
setServerProp "spawn-protection" SPAWN_PROTECTION setServerProp "spawn-npcs" "$SPAWN_NPCS"
setServerProp "generate-structures" GENERATE_STRUCTURES setServerProp "spawn-protection" "$SPAWN_PROTECTION"
setServerProp "view-distance" VIEW_DISTANCE setServerProp "generate-structures" "$GENERATE_STRUCTURES"
setServerProp "hardcore" HARDCORE setServerProp "view-distance" "$VIEW_DISTANCE"
setServerProp "snooper-enabled" SNOOPER_ENABLED setServerProp "hardcore" "$HARDCORE"
setServerProp "max-build-height" MAX_BUILD_HEIGHT setServerProp "snooper-enabled" "$SNOOPER_ENABLED"
setServerProp "force-gamemode" FORCE_GAMEMODE setServerProp "max-build-height" "$MAX_BUILD_HEIGHT"
setServerProp "max-tick-time" MAX_TICK_TIME setServerProp "force-gamemode" "$FORCE_GAMEMODE"
setServerProp "enable-query" ENABLE_QUERY setServerProp "max-tick-time" "$MAX_TICK_TIME"
setServerProp "query.port" QUERY_PORT setServerProp "enable-query" "$ENABLE_QUERY"
setServerProp "enable-rcon" ENABLE_RCON setServerProp "query.port" "$QUERY_PORT"
setServerProp "rcon.password" RCON_PASSWORD setServerProp "enable-rcon" "$ENABLE_RCON"
setServerProp "rcon.port" RCON_PORT setServerProp "rcon.password" "$RCON_PASSWORD"
setServerProp "max-players" MAX_PLAYERS setServerProp "rcon.port" "$RCON_PORT"
setServerProp "max-world-size" MAX_WORLD_SIZE setServerProp "max-players" "$MAX_PLAYERS"
setServerProp "level-name" LEVEL setServerProp "max-world-size" "$MAX_WORLD_SIZE"
setServerProp "level-seed" SEED setServerProp "level-name" "$LEVEL"
setServerProp "pvp" PVP setServerProp "level-seed" "$SEED"
setServerProp "generator-settings" GENERATOR_SETTINGS setServerProp "pvp" "${PVP}"
setServerProp "online-mode" ONLINE_MODE setServerProp "generator-settings" "$GENERATOR_SETTINGS"
setServerProp "allow-flight" ALLOW_FLIGHT setServerProp "online-mode" "$ONLINE_MODE"
setServerProp "resource-pack" RESOURCE_PACK setServerProp "allow-flight" "$ALLOW_FLIGHT"
setServerProp "resource-pack-sha1" RESOURCE_PACK_SHA1 setServerProp "level-type" "${LEVEL_TYPE^^}"
setServerProp "player-idle-timeout" PLAYER_IDLE_TIMEOUT setServerProp "resource-pack" "$RESOURCE_PACK"
setServerProp "broadcast-console-to-ops" BROADCAST_CONSOLE_TO_OPS setServerProp "resource-pack-sha1" "$RESOURCE_PACK_SHA1"
setServerProp "broadcast-rcon-to-ops" BROADCAST_RCON_TO_OPS setServerProp "player-idle-timeout" "$PLAYER_IDLE_TIMEOUT"
setServerProp "enable-jmx-monitoring" ENABLE_JMX setServerProp "broadcast-console-to-ops" "$BROADCAST_CONSOLE_TO_OPS"
setServerProp "sync-chunk-writes" SYNC_CHUNK_WRITES setServerProp "broadcast-rcon-to-ops" "$BROADCAST_RCON_TO_OPS"
setServerProp "enable-status" ENABLE_STATUS setServerProp "enable-jmx-monitoring" "$ENABLE_JMX"
setServerProp "entity-broadcast-range-percentage" ENTITY_BROADCAST_RANGE_PERCENTAGE setServerProp "sync-chunk-writes" "$SYNC_CHUNK_WRITES"
setServerProp "function-permission-level" FUNCTION_PERMISSION_LEVEL setServerProp "enable-status" "$ENABLE_STATUS"
setServerProp "network-compression-threshold" NETWORK_COMPRESSION_THRESHOLD setServerProp "entity-broadcast-range-percentage" "$ENTITY_BROADCAST_RANGE_PERCENTAGE"
setServerProp "op-permission-level" OP_PERMISSION_LEVEL setServerProp "function-permission-level" "$FUNCTION_PERMISSION_LEVEL"
setServerProp "prevent-proxy-connections" PREVENT_PROXY_CONNECTIONS setServerProp "network-compression-threshold" "$NETWORK_COMPRESSION_THRESHOLD"
setServerProp "use-native-transport" USE_NATIVE_TRANSPORT setServerProp "op-permission-level" "$OP_PERMISSION_LEVEL"
setServerProp "enforce-whitelist" ENFORCE_WHITELIST setServerProp "prevent-proxy-connections" "$PREVENT_PROXY_CONNECTIONS"
setServerProp "simulation-distance" SIMULATION_DISTANCE setServerProp "use-native-transport" "$USE_NATIVE_TRANSPORT"
setServerPropValue "motd" "$(echo "$MOTD" | mc-image-helper asciify)" setServerProp "enforce-whitelist" "$ENFORCE_WHITELIST"
[[ $LEVEL_TYPE ]] && setServerPropValue "level-type" "${LEVEL_TYPE^^}" setServerProp "simulation-distance" "$SIMULATION_DISTANCE"
if [ -n "$DIFFICULTY" ]; then if [ -n "$DIFFICULTY" ]; then
case ${DIFFICULTY,,} in case $DIFFICULTY in
peaceful|0) peaceful|0)
if versionLessThan 1.13; then if versionLessThan 1.13; then
DIFFICULTY=0 DIFFICULTY=0
@@ -143,12 +137,13 @@ function customizeServerProps {
exit 1 exit 1
;; ;;
esac esac
setServerPropValue "difficulty" "$DIFFICULTY" setServerProp "difficulty" "$DIFFICULTY"
fi fi
if [ -n "$MODE" ]; then if [ -n "$MODE" ]; then
log "Setting mode" log "Setting mode"
case ${MODE,,} in MODE_LC=$( echo $MODE | tr '[:upper:]' '[:lower:]' )
case $MODE_LC in
su*|0) su*|0)
if versionLessThan 1.13; then if versionLessThan 1.13; then
MODE=0 MODE=0
@@ -182,7 +177,7 @@ function customizeServerProps {
exit 1 exit 1
;; ;;
esac esac
setServerPropValue "gamemode" "$MODE" setServerProp "gamemode" "$MODE"
fi fi
} }
@@ -215,16 +210,16 @@ fi
if isTrue "${ENABLE_AUTOPAUSE}"; then if isTrue "${ENABLE_AUTOPAUSE}"; then
current_max_tick=$( grep 'max-tick-time' "$SERVER_PROPERTIES" | sed -r 's/( )+//g' | awk -F= '{print $2}' ) current_max_tick=$( grep 'max-tick-time' "$SERVER_PROPERTIES" | sed -r 's/( )+//g' | awk -F= '{print $2}' )
if (( current_max_tick > 0 && current_max_tick < 86400000 )); then if (( $current_max_tick > 0 && $current_max_tick < 86400000 )); then
log "Warning: The server.properties for the server doesn't have the Server Watchdog (effectively) disabled." log "Warning: The server.properties for the server doesn't have the Server Watchdog (effectively) disabled."
log "Warning (cont): Autopause functionality resuming the process might trigger the Watchdog and restart the server completely." log "Warning (cont): Autopause functionality resuming the process might trigger the Watchdog and restart the server completely."
log "Warning (cont): Set the max-tick-time property to a high value (or disable the Watchdog with value -1 for versions 1.8.1+)." log "Warning (cont): Set the max-tick-time property to a high value (or disable the Watchdog with value -1 for versions 1.8.1+)."
fi fi
fi fi
if isDebugging && [ -f "${SERVER_PROPERTIES}" ]; then if isDebugging; then
log "DEBUG Dumping server.properties" log "DEBUG Dumping server.properties"
cat "${SERVER_PROPERTIES}" cat "${SERVER_PROPERTIES}"
fi fi
exec "${SCRIPTS:-/}start-setupEnvVariables" "$@" exec ${SCRIPTS:-/}start-setupEnvVariables $@

View File

@@ -1,14 +1,16 @@
#!/bin/bash #!/bin/bash
# shellcheck source=start-utils . ${SCRIPTS:-/}start-utils
. "${SCRIPTS:-/}start-utils"
set -e set -e
isDebugging && set -x isDebugging && set -x
: ${LEVEL:=world}
export LEVEL
if [ $TYPE = "CURSEFORGE" ]; then if [ $TYPE = "CURSEFORGE" ]; then
worldDest=$FTB_DIR/${LEVEL:-world} worldDest=$FTB_DIR/$LEVEL
else else
worldDest=/data/${LEVEL:-world} worldDest=/data/$LEVEL
fi fi
if [[ "$WORLD" ]] && ( isTrue "${FORCE_WORLD_COPY}" || [ ! -d "$worldDest" ] ); then if [[ "$WORLD" ]] && ( isTrue "${FORCE_WORLD_COPY}" || [ ! -d "$worldDest" ] ); then
@@ -69,4 +71,4 @@ if [[ "$WORLD" ]] && ( isTrue "${FORCE_WORLD_COPY}" || [ ! -d "$worldDest" ] );
fi fi
fi fi
exec "${SCRIPTS:-/}start-setupModpack" "$@" exec ${SCRIPTS:-/}start-setupModpack $@