mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-17 07:03:57 +00:00
Improve local development (#3661)
This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -54,7 +54,8 @@ ARG MC_HELPER_BASE_URL=${GITHUB_BASEURL}/itzg/mc-image-helper/releases/download/
|
||||
ARG MC_HELPER_REV=1
|
||||
RUN curl -fsSL ${MC_HELPER_BASE_URL}/mc-image-helper-${MC_HELPER_VERSION}.tgz \
|
||||
| tar -C /usr/share -zxf - \
|
||||
&& ln -s /usr/share/mc-image-helper-${MC_HELPER_VERSION}/bin/mc-image-helper /usr/bin
|
||||
&& ln -s /usr/share/mc-image-helper-${MC_HELPER_VERSION}/ /usr/share/mc-image-helper \
|
||||
&& ln -s /usr/share/mc-image-helper/bin/mc-image-helper /usr/bin
|
||||
|
||||
VOLUME ["/data"]
|
||||
WORKDIR /data
|
||||
@@ -64,16 +65,16 @@ STOPSIGNAL SIGTERM
|
||||
# End user MUST set EULA and change RCON_PASSWORD
|
||||
ENV TYPE=VANILLA VERSION=LATEST EULA="" UID=1000 GID=1000 LC_ALL=en_US.UTF-8
|
||||
|
||||
COPY --chmod=755 scripts/start* /
|
||||
COPY --chmod=755 scripts/start* /image/scripts/
|
||||
COPY --chmod=755 scripts/auto/* /image/scripts/auto/
|
||||
COPY --chmod=755 files/shims/ /usr/local/bin/
|
||||
COPY --chmod=755 files/* /image/
|
||||
COPY --chmod=755 files/auto /auto
|
||||
|
||||
RUN curl -fsSL -o /image/Log4jPatcher.jar https://github.com/CreeperHost/Log4jPatcher/releases/download/v1.0.1/Log4jPatcher-1.0.1.jar
|
||||
|
||||
RUN dos2unix /start* /auto/*
|
||||
RUN dos2unix /image/scripts/start* /image/scripts/auto/*
|
||||
|
||||
ENTRYPOINT [ "/start" ]
|
||||
ENTRYPOINT [ "/image/scripts/start" ]
|
||||
HEALTHCHECK --start-period=2m --retries=2 --interval=30s CMD mc-health
|
||||
|
||||
ARG BUILDTIME=local
|
||||
|
||||
@@ -47,20 +47,20 @@ popd
|
||||
Using the baseline image, an interactive container can be started to iteratively run the scripts to be developed. By attaching the current workspace directory, you can use the local editor of your choice to iteratively modify scripts while using the container to run them.
|
||||
|
||||
```shell
|
||||
docker run -it --rm -v ${PWD}:/scripts -e SCRIPTS=/scripts/ --entrypoint bash mc-dev
|
||||
docker run -it --rm -v ${PWD}:/image/scripts --entrypoint bash mc-dev
|
||||
```
|
||||
|
||||
From within the container you can run individual scripts via the attached `/scripts/` path; however, be sure to set any environment variables expected by the scripts by either `export`ing them manually:
|
||||
From within the container you can run individual scripts via the attached `/image/scripts/` path; however, be sure to set any environment variables expected by the scripts by either `export`ing them manually:
|
||||
|
||||
```shell
|
||||
export VERSION=1.12.2
|
||||
/scripts/start-magma
|
||||
/image/scripts/start-deployFabric
|
||||
```
|
||||
|
||||
...or pre-pending script execution:
|
||||
|
||||
```shell
|
||||
VERSION=1.12.2 /scripts/start-magma
|
||||
VERSION=1.12.2 /image/scripts/start-deployFabric
|
||||
```
|
||||
|
||||
!!! note
|
||||
@@ -69,15 +69,28 @@ VERSION=1.12.2 /scripts/start-magma
|
||||
|
||||
## Using development copy of tools
|
||||
|
||||
In the cloned repo, such as [`mc-image-helper`](https://github.com/itzg/mc-image-helper), create an up-to-date snapshot build of the tgz distribution using:
|
||||
In the cloned repo, such as [`mc-image-helper`](https://github.com/itzg/mc-image-helper), install the distribution locally by running:
|
||||
|
||||
```shell
|
||||
./gradlew distTar
|
||||
./gradlew installDist
|
||||
```
|
||||
|
||||
!!! note
|
||||
The distribution will be installed in the project's `build/install/mc-image-helper`. Obtain the absolute path to that directory use in the next step.
|
||||
|
||||
The distribution's version will be `0.0.0-<branch>-SNAPSHOT`
|
||||
Refer to the instructions above to mount any locally modified image scripts or build a local copy of the image using or with alternate `BASE_IMAGE`, as described above:
|
||||
|
||||
```shell
|
||||
docker build -t itzg/minecraft-server .
|
||||
```
|
||||
|
||||
Mount the local mc-image-helper distribution directory as a volume in the container at the path `/usr/share/mc-image-helper`, such as
|
||||
|
||||
```shell
|
||||
docker run -it --rm \
|
||||
-v /path/to/mc-image-helper/build/install/mc-image-helper:/usr/share/mc-image-helper \
|
||||
-e EULA=true \
|
||||
itzg/minecraft-server
|
||||
```
|
||||
|
||||
For Go base tools, run
|
||||
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
[unpauseMCServer-server]
|
||||
sequence = 25565
|
||||
seq_timeout = 1
|
||||
command = /auto/resume.sh %IP%
|
||||
command = /image/scripts/auto/resume.sh %IP%
|
||||
tcpflags = syn
|
||||
[unpauseMCServer-rcon]
|
||||
sequence = 25575
|
||||
seq_timeout = 1
|
||||
command = /auto/resume.sh %IP%
|
||||
command = /image/scripts/auto/resume.sh %IP%
|
||||
tcpflags = syn
|
||||
[unpauseMCServer-bedrock]
|
||||
sequence = 19132:udp
|
||||
command = /auto/resume.sh %IP%
|
||||
command = /image/scripts/auto/resume.sh %IP%
|
||||
seq_cooldown = 60
|
||||
@@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=../scripts/start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "/image/scripts/start-utils"
|
||||
if [ -f /data/.mc-health.env ]; then
|
||||
. /data/.mc-health.env
|
||||
fi
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
. "/start-utils"
|
||||
. "/image/scripts/start-utils"
|
||||
: "${CONSOLE_IN_NAMED_PIPE:=/tmp/minecraft-console-in}"
|
||||
|
||||
if isFalse "${CREATE_CONSOLE_IN_PIPE:-false}"; then
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
. /auto/autopause-fcns.sh
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. ${SCRIPTS:-/}start-utils
|
||||
. /image/scripts/start-utils
|
||||
|
||||
run_command(){
|
||||
rcon_cmd="$1"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
. /auto/autopause-fcns.sh
|
||||
. "$(dirname "$0")/autopause-fcns.sh"
|
||||
|
||||
# shellcheck source=../../scripts/start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
# shellcheck source=../start-utils
|
||||
. "$(dirname "$0")/../start-utils"
|
||||
if isTrue "${DEBUG_AUTOPAUSE}"; then
|
||||
set -x
|
||||
fi
|
||||
@@ -84,7 +84,7 @@ do
|
||||
else
|
||||
if [[ $(current_uptime) -ge $TIME_THRESH ]] ; then
|
||||
logAutopause "No client connected since startup / knocked - pausing"
|
||||
/auto/pause.sh
|
||||
"$(dirname "$0")/pause.sh"
|
||||
STATE=S
|
||||
fi
|
||||
fi
|
||||
@@ -109,7 +109,7 @@ do
|
||||
else
|
||||
if [[ $(current_uptime) -ge $TIME_THRESH ]] ; then
|
||||
logAutopause "No client reconnected - pausing"
|
||||
/auto/pause.sh
|
||||
"$(dirname "$0")/pause.sh"
|
||||
STATE=S
|
||||
fi
|
||||
fi
|
||||
@@ -117,7 +117,7 @@ do
|
||||
XS)
|
||||
# Stopped
|
||||
if rcon_client_exists ; then
|
||||
/auto/resume.sh
|
||||
"$(dirname "$0")/resume.sh"
|
||||
fi
|
||||
if java_running ; then
|
||||
if java_clients_connected ; then
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=../scripts/start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "$(dirname "$0")/../start-utils"
|
||||
current_uptime() {
|
||||
awk '{print $1}' /proc/uptime | cut -d . -f 1
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# needed for the clients connected function residing in autopause
|
||||
. /auto/autopause-fcns.sh
|
||||
. "$(dirname "$0")/autopause-fcns.sh"
|
||||
|
||||
# shellcheck source=../../scripts/start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "$(dirname "$0")/../start-utils"
|
||||
if isTrue "${DEBUG_AUTOSTOP}"; then
|
||||
set -x
|
||||
fi
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
. /start-utils
|
||||
. "$(dirname "$0")/../start-utils"
|
||||
if isTrue "${DEBUG_AUTOPAUSE}"; then
|
||||
set -x
|
||||
fi
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
. /start-utils
|
||||
. "$(dirname "$0")/../start-utils"
|
||||
if isTrue "${DEBUG_AUTOPAUSE}"; then
|
||||
set -x
|
||||
fi
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
. /start-utils
|
||||
. "$(dirname "$0")/../start-utils"
|
||||
if isTrue "${DEBUG_AUTOSTOP}"; then
|
||||
set -x
|
||||
fi
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "$(dirname "$0")/start-utils"
|
||||
|
||||
# The Dockerfile ENVs take precedence here, but defaulting for testing consistency
|
||||
: "${UID:=1000}"
|
||||
@@ -48,7 +48,7 @@ if ! isTrue "${SKIP_SUDO:-false}" && [ "$(id -u)" = 0 ]; then
|
||||
echo 'hosts: files dns' > /etc/nsswitch.conf
|
||||
fi
|
||||
|
||||
exec $(getSudoFromDistro) ${runAsUser}:${runAsGroup} "${SCRIPTS:-/}start-configuration" "$@"
|
||||
exec $(getSudoFromDistro) ${runAsUser}:${runAsGroup} "$(dirname "$0")/start-configuration" "$@"
|
||||
else
|
||||
exec "${SCRIPTS:-/}start-configuration" "$@"
|
||||
exec "$(dirname "$0")/start-configuration" "$@"
|
||||
fi
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "$(dirname "$0")/start-utils"
|
||||
|
||||
: "${SERVER_PORT:=25565}"
|
||||
: "${ENABLE_AUTOPAUSE:=false}"
|
||||
@@ -24,7 +24,7 @@ log "Autopause functionality enabled"
|
||||
|
||||
isDebugging && set -x
|
||||
|
||||
cp /auto/knockd-config.cfg /tmp/knockd-config.cfg
|
||||
cp /image/knockd-config.cfg /tmp/knockd-config.cfg
|
||||
|
||||
function updatePort() {
|
||||
regseq="^\s*sequence\s*=\s*$1\s*$"
|
||||
@@ -69,4 +69,4 @@ fi
|
||||
let COOLDOWN=$AUTOPAUSE_TIMEOUT_KN/2
|
||||
sed -i "s/\(seq_cooldown *= *\).*/\1$COOLDOWN/" /tmp/knockd-config.cfg
|
||||
|
||||
/auto/autopause-daemon.sh &
|
||||
"$(dirname "$0")/auto/autopause-daemon.sh" &
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "$(dirname "$0")/start-utils"
|
||||
|
||||
: "${SERVER_PORT:=25565}"
|
||||
: "${ENABLE_AUTOSTOP:=false}"
|
||||
|
||||
@@ -3,7 +3,7 @@ set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "$(dirname "$0")/start-utils"
|
||||
|
||||
: "${EULA:=}"
|
||||
: "${PROXY:=}"
|
||||
@@ -166,11 +166,11 @@ if isTrue "${VERSION_FROM_MODRINTH_PROJECTS:-}" && [[ ${MODRINTH_PROJECTS:-} ]];
|
||||
fi
|
||||
|
||||
if isTrue "${ENABLE_AUTOPAUSE}"; then
|
||||
"${SCRIPTS:-/}start-autopause"
|
||||
"$(dirname "$0")/start-autopause"
|
||||
fi
|
||||
|
||||
if isTrue "${ENABLE_AUTOSTOP}"; then
|
||||
"${SCRIPTS:-/}start-autostop"
|
||||
"$(dirname "$0")/start-autostop"
|
||||
fi
|
||||
|
||||
if
|
||||
@@ -182,7 +182,7 @@ if
|
||||
then
|
||||
log "Starting RCON commands"
|
||||
# shellcheck source=start-rconcmds
|
||||
"${SCRIPTS:-/}start-rconcmds"
|
||||
"$(dirname "$0")/start-rconcmds"
|
||||
fi
|
||||
|
||||
: "${MODPACK_PLATFORM:=${MOD_PLATFORM:-}}"
|
||||
@@ -200,19 +200,19 @@ esac
|
||||
if [[ $MODPACK_PLATFORM ]]; then
|
||||
case "${MODPACK_PLATFORM^^}" in
|
||||
FTB|CURSEFORGE)
|
||||
exec "${SCRIPTS:-/}start-deployCF" "$@"
|
||||
exec "$(dirname "$0")/start-deployCF" "$@"
|
||||
;;
|
||||
|
||||
FTBA)
|
||||
exec "${SCRIPTS:-/}start-deployFTBA" "$@"
|
||||
exec "$(dirname "$0")/start-deployFTBA" "$@"
|
||||
;;
|
||||
|
||||
AUTO_CURSEFORGE)
|
||||
exec "${SCRIPTS:-/}start-deployAutoCF" "$@"
|
||||
exec "$(dirname "$0")/start-deployAutoCF" "$@"
|
||||
;;
|
||||
|
||||
MODRINTH)
|
||||
exec "${SCRIPTS:-/}start-deployModrinth" "$@"
|
||||
exec "$(dirname "$0")/start-deployModrinth" "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
@@ -225,99 +225,99 @@ fi
|
||||
log "Resolving type given ${TYPE}"
|
||||
case "${TYPE^^}" in
|
||||
*BUKKIT|SPIGOT)
|
||||
exec "${SCRIPTS:-/}start-deployBukkitSpigot" "$@"
|
||||
exec "$(dirname "$0")/start-deployBukkitSpigot" "$@"
|
||||
;;
|
||||
|
||||
PAPER)
|
||||
exec "${SCRIPTS:-/}start-deployPaper" "$@"
|
||||
exec "$(dirname "$0")/start-deployPaper" "$@"
|
||||
;;
|
||||
|
||||
FOLIA)
|
||||
exec "${SCRIPTS:-/}start-deployFolia" "$@"
|
||||
exec "$(dirname "$0")/start-deployFolia" "$@"
|
||||
;;
|
||||
|
||||
FORGE)
|
||||
exec "${SCRIPTS:-/}start-deployForge" "$@"
|
||||
exec "$(dirname "$0")/start-deployForge" "$@"
|
||||
;;
|
||||
|
||||
NEOFORGE|NEOFORGED)
|
||||
exec "${SCRIPTS:-/}start-deployNeoForge" "$@"
|
||||
exec "$(dirname "$0")/start-deployNeoForge" "$@"
|
||||
;;
|
||||
|
||||
FABRIC)
|
||||
exec "${SCRIPTS:-/}start-deployFabric" "$@"
|
||||
exec "$(dirname "$0")/start-deployFabric" "$@"
|
||||
;;
|
||||
|
||||
QUILT)
|
||||
exec "${SCRIPTS:-/}start-deployQuilt" "$@"
|
||||
exec "$(dirname "$0")/start-deployQuilt" "$@"
|
||||
;;
|
||||
|
||||
VANILLA)
|
||||
exec "${SCRIPTS:-/}start-deployVanilla" "$@"
|
||||
exec "$(dirname "$0")/start-deployVanilla" "$@"
|
||||
;;
|
||||
|
||||
SPONGEVANILLA)
|
||||
exec "${SCRIPTS:-/}start-deploySpongeVanilla" "$@"
|
||||
exec "$(dirname "$0")/start-deploySpongeVanilla" "$@"
|
||||
;;
|
||||
|
||||
CUSTOM)
|
||||
exec "${SCRIPTS:-/}start-deployCustom" "$@"
|
||||
exec "$(dirname "$0")/start-deployCustom" "$@"
|
||||
;;
|
||||
|
||||
MAGMA)
|
||||
exec "${SCRIPTS:-/}start-deployMagma" "$@"
|
||||
exec "$(dirname "$0")/start-deployMagma" "$@"
|
||||
;;
|
||||
|
||||
MAGMA_MAINTAINED)
|
||||
exec "${SCRIPTS:-/}start-deployMagmaMaintained" "$@"
|
||||
exec "$(dirname "$0")/start-deployMagmaMaintained" "$@"
|
||||
;;
|
||||
|
||||
KETTING)
|
||||
exec "${SCRIPTS:-/}start-deployKetting" "$@"
|
||||
exec "$(dirname "$0")/start-deployKetting" "$@"
|
||||
;;
|
||||
|
||||
MOHIST|YOUER|BANNER)
|
||||
exec "${SCRIPTS:-/}start-deployMohist" "$@"
|
||||
exec "$(dirname "$0")/start-deployMohist" "$@"
|
||||
;;
|
||||
|
||||
CATSERVER)
|
||||
exec "${SCRIPTS:-/}start-deployCatserver" "$@"
|
||||
exec "$(dirname "$0")/start-deployCatserver" "$@"
|
||||
;;
|
||||
|
||||
PURPUR)
|
||||
exec "${SCRIPTS:-/}start-deployPurpur" "$@"
|
||||
exec "$(dirname "$0")/start-deployPurpur" "$@"
|
||||
;;
|
||||
|
||||
PUFFERFISH)
|
||||
exec "${SCRIPTS:-/}start-deployPufferfish" "$@"
|
||||
exec "$(dirname "$0")/start-deployPufferfish" "$@"
|
||||
;;
|
||||
|
||||
CANYON)
|
||||
exec "${SCRIPTS:-/}start-deployCanyon" "$@"
|
||||
exec "$(dirname "$0")/start-deployCanyon" "$@"
|
||||
;;
|
||||
|
||||
LIMBO)
|
||||
exec "${SCRIPTS:-/}start-deployLimbo" "$@"
|
||||
exec "$(dirname "$0")/start-deployLimbo" "$@"
|
||||
;;
|
||||
|
||||
NANOLIMBO)
|
||||
exec "${SCRIPTS:-/}start-deployNanoLimbo" "$@"
|
||||
exec "$(dirname "$0")/start-deployNanoLimbo" "$@"
|
||||
;;
|
||||
|
||||
CRUCIBLE)
|
||||
exec "${SCRIPTS:-/}start-deployCrucible" "$@"
|
||||
exec "$(dirname "$0")/start-deployCrucible" "$@"
|
||||
;;
|
||||
|
||||
LEAF)
|
||||
exec "${SCRIPTS:-/}start-deployLeaf" "$@"
|
||||
exec "$(dirname "$0")/start-deployLeaf" "$@"
|
||||
;;
|
||||
|
||||
ARCLIGHT)
|
||||
exec "${SCRIPTS:-/}start-deployArcLight" "$@"
|
||||
exec "$(dirname "$0")/start-deployArcLight" "$@"
|
||||
;;
|
||||
|
||||
POSEIDON)
|
||||
exec "${SCRIPTS:-/}start-deployPoseidon" "$@"
|
||||
exec "$(dirname "$0")/start-deployPoseidon" "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
|
||||
@@ -38,4 +38,4 @@ export SERVER
|
||||
export FAMILY=HYBRID
|
||||
export HYBRIDTYPE="${ARCLIGHT_TYPE,,}"
|
||||
|
||||
exec "${SCRIPTS:-/}start-spiget" "$@"
|
||||
exec "$(dirname "$0")/start-spiget" "$@"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set -eu
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "$(dirname "$0")/start-utils"
|
||||
|
||||
: "${CF_PAGE_URL:=}"
|
||||
: "${CF_SLUG:=}"
|
||||
@@ -75,4 +75,4 @@ fi
|
||||
applyResultsFile ${resultsFile}
|
||||
resolveFamily
|
||||
|
||||
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|
||||
exec "$(dirname "$0")/start-setupWorld" "$@"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "$(dirname "$0")/start-utils"
|
||||
isDebugging && set -x
|
||||
|
||||
set -eo pipefail
|
||||
@@ -123,4 +123,4 @@ export JVM_OPTS
|
||||
# Normalize on Spigot for operations below
|
||||
export FAMILY=SPIGOT
|
||||
|
||||
exec "${SCRIPTS:-/}start-spiget" "$@"
|
||||
exec "$(dirname "$0")/start-spiget" "$@"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
set -e
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "$(dirname "$0")/start-utils"
|
||||
|
||||
loadForgeVars() {
|
||||
cfgFile=${1?}
|
||||
@@ -138,7 +138,7 @@ if ! isTrue "${USE_MODPACK_START_SCRIPT:-true}"; then
|
||||
FTB_DIR=$(dirname "${SERVER}")
|
||||
export FTB_DIR
|
||||
|
||||
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|
||||
exec "$(dirname "$0")/start-setupWorld" "$@"
|
||||
fi
|
||||
|
||||
|
||||
@@ -250,4 +250,4 @@ if isTrue "${FTB_LEGACYJAVAFIXER}" && [ ! -e "${legacyJavaFixerPath}" ]; then
|
||||
fi
|
||||
|
||||
export FAMILY=FORGE
|
||||
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|
||||
exec "$(dirname "$0")/start-setupWorld" "$@"
|
||||
|
||||
@@ -3,7 +3,7 @@ set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "$(dirname "$0")/start-utils"
|
||||
isDebugging && set -x
|
||||
|
||||
: "${CANYON_BUILD:=lastSuccessfulBuild}"
|
||||
@@ -58,4 +58,4 @@ fi
|
||||
# Normalize on Spigot for later operations
|
||||
export FAMILY=SPIGOT
|
||||
|
||||
exec ${SCRIPTS:-/}start-spiget "$@"
|
||||
exec "$(dirname "$0")/start-spiget" "$@"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "$(dirname "$0")/start-utils"
|
||||
set -o pipefail
|
||||
set -e
|
||||
|
||||
@@ -30,4 +30,4 @@ fi
|
||||
export FAMILY=HYBRID
|
||||
export HYBRIDTYPE=forge
|
||||
|
||||
exec "${SCRIPTS:-/}start-spiget" "$@"
|
||||
exec "$(dirname "$0")/start-spiget" "$@"
|
||||
|
||||
@@ -58,4 +58,4 @@ export SERVER
|
||||
export FAMILY=HYBRID
|
||||
export HYBRIDTYPE=forge
|
||||
|
||||
exec "${SCRIPTS:-/}start-spiget" "$@"
|
||||
exec "$(dirname "$0")/start-spiget" "$@"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
: "${CUSTOM_JAR_EXEC:=}"
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "$(dirname "$0")/start-utils"
|
||||
isDebugging && set -x
|
||||
|
||||
if isURL "${CUSTOM_SERVER}"; then
|
||||
@@ -42,4 +42,4 @@ fi
|
||||
export FAMILY="${FAMILY:-HYBRID}"
|
||||
export HYBRIDTYPE="${HYBRIDTYPE:-any}"
|
||||
|
||||
exec "${SCRIPTS:-/}start-spiget" "$@"
|
||||
exec "$(dirname "$0")/start-spiget" "$@"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
ftbInstallMarker=".ftb-installed"
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "$(dirname "$0")/start-utils"
|
||||
isDebugging && set -x
|
||||
set -e
|
||||
|
||||
@@ -160,4 +160,4 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|
||||
exec "$(dirname "$0")/start-setupWorld" "$@"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set -eu
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "$(dirname "$0")/start-utils"
|
||||
|
||||
export TYPE=FABRIC
|
||||
: "${FABRIC_LAUNCHER_VERSION:=${FABRIC_INSTALLER_VERSION:-LATEST}}"
|
||||
@@ -56,4 +56,4 @@ fi
|
||||
applyResultsFile ${resultsFile}
|
||||
|
||||
export FAMILY=FABRIC
|
||||
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|
||||
exec "$(dirname "$0")/start-setupWorld" "$@"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
: "${FOLIA_CHANNEL:=experimental}"
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "$(dirname "$0")/start-utils"
|
||||
set -o pipefail
|
||||
handleDebugMode
|
||||
|
||||
@@ -18,4 +18,4 @@ fi
|
||||
PAPER_PROJECT="folia" \
|
||||
PAPER_NAME="FoliaMC" \
|
||||
PAPER_CHANNEL="${FOLIA_CHANNEL}" \
|
||||
exec "${SCRIPTS:-/}start-deployPaper" "$@"
|
||||
exec "$(dirname "$0")/start-deployPaper" "$@"
|
||||
|
||||
@@ -46,4 +46,4 @@ applyResultsFile ${resultsFile}
|
||||
|
||||
export FAMILY=FORGE
|
||||
|
||||
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|
||||
exec "$(dirname "$0")/start-setupWorld" "$@"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "$(dirname "$0")/start-utils"
|
||||
isDebugging && set -x
|
||||
|
||||
if ! SERVER=$(mc-image-helper github download-latest-asset \
|
||||
@@ -30,4 +30,4 @@ export SERVER
|
||||
export FAMILY=HYBRID
|
||||
export HYBRIDTYPE=forge
|
||||
|
||||
exec "${SCRIPTS:-/}start-spiget" "$@"
|
||||
exec "$(dirname "$0")/start-spiget" "$@"
|
||||
|
||||
@@ -48,4 +48,4 @@ fi
|
||||
export FAMILY=SPIGOT
|
||||
export SERVER
|
||||
|
||||
exec "${SCRIPTS:-/}start-spiget" "$@"
|
||||
exec "$(dirname "$0")/start-spiget" "$@"
|
||||
@@ -2,15 +2,15 @@
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
. ${SCRIPTS:-/}start-utils
|
||||
. "$(dirname "$0")/start-utils"
|
||||
isDebugging && set -x
|
||||
|
||||
: ${LIMBO_BUILD:=LATEST}
|
||||
: ${FORCE_REDOWNLOAD:=false}
|
||||
: ${LIMBO_SCHEMA_FILENAME:=default.schem}
|
||||
: ${LEVEL:=default;${LIMBO_SCHEMA_FILENAME}}
|
||||
: "${LIMBO_BUILD:=LATEST}"
|
||||
: "${FORCE_REDOWNLOAD:=false}"
|
||||
: "${LIMBO_SCHEMA_FILENAME:=default.schem}"
|
||||
: "${LEVEL:=default;${LIMBO_SCHEMA_FILENAME}}"
|
||||
# defaults to localhost, if this is not set
|
||||
: ${SERVER_IP:=0.0.0.0}
|
||||
: "${SERVER_IP:=0.0.0.0}"
|
||||
|
||||
export LEVEL SERVER_IP
|
||||
|
||||
@@ -65,4 +65,4 @@ fi
|
||||
export LEVEL
|
||||
|
||||
export FAMILY=LIMBO
|
||||
exec ${SCRIPTS:-/}start-setupWorld "$@"
|
||||
exec "$(dirname "$0")/start-setupWorld" "$@"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "$(dirname "$0")/start-utils"
|
||||
isDebugging && set -x
|
||||
|
||||
: "${MAGMA_VERSION:=}"
|
||||
@@ -27,4 +27,4 @@ export SERVER
|
||||
export FAMILY=HYBRID
|
||||
export HYBRIDTYPE=forge
|
||||
|
||||
exec "${SCRIPTS:-/}start-spiget" "$@"
|
||||
exec "$(dirname "$0")/start-spiget" "$@"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "$(dirname "$0")/start-utils"
|
||||
isDebugging && set -x
|
||||
|
||||
: "${FORGE_VERSION:=}"
|
||||
@@ -36,4 +36,4 @@ export SERVER
|
||||
export FAMILY=HYBRID
|
||||
export HYBRIDTYPE=forge
|
||||
|
||||
exec "${SCRIPTS:-/}start-spiget" "$@"
|
||||
exec "$(dirname "$0")/start-spiget" "$@"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set -eu
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "$(dirname "$0")/start-utils"
|
||||
|
||||
resultsFile=/data/.install-modrinth.env
|
||||
|
||||
@@ -75,4 +75,4 @@ fi
|
||||
applyResultsFile ${resultsFile}
|
||||
resolveFamily
|
||||
|
||||
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|
||||
exec "$(dirname "$0")/start-setupWorld" "$@"
|
||||
|
||||
@@ -62,4 +62,4 @@ fi
|
||||
export SERVER
|
||||
export FAMILY=HYBRID
|
||||
|
||||
exec "${SCRIPTS:-/}start-spiget" "$@"
|
||||
exec "$(dirname "$0")/start-spiget" "$@"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "$(dirname "$0")/start-utils"
|
||||
isDebugging && set -x
|
||||
|
||||
if ! SERVER=$(mc-image-helper github download-latest-asset \
|
||||
@@ -16,4 +16,4 @@ fi
|
||||
export SERVER
|
||||
export FAMILY=LIMBO
|
||||
|
||||
exec ${SCRIPTS:-/}start-setupMounts "$@"
|
||||
exec $(dirname "$0")/start-setupMounts "$@"
|
||||
|
||||
@@ -23,4 +23,4 @@ applyResultsFile ${resultsFile}
|
||||
|
||||
export FAMILY=FORGE
|
||||
|
||||
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|
||||
exec "$(dirname "$0")/start-setupWorld" "$@"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "$(dirname "$0")/start-utils"
|
||||
set -o pipefail
|
||||
handleDebugMode
|
||||
|
||||
@@ -58,4 +58,4 @@ export DOWNLOAD_DEFAULTS
|
||||
# Normalize on Spigot for downstream operations
|
||||
export FAMILY=SPIGOT
|
||||
|
||||
exec "${SCRIPTS:-/}start-spiget" "$@"
|
||||
exec "$(dirname "$0")/start-spiget" "$@"
|
||||
|
||||
@@ -34,4 +34,4 @@ fi
|
||||
export SERVER
|
||||
export FAMILY=SPIGOT
|
||||
|
||||
exec "${SCRIPTS:-/}start-spiget" "$@"
|
||||
exec "$(dirname "$0")/start-spiget" "$@"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "$(dirname "$0")/start-utils"
|
||||
|
||||
set -euo pipefail
|
||||
isDebugging && set -x
|
||||
@@ -45,4 +45,4 @@ fi
|
||||
# Normalize on Spigot for later operations
|
||||
export FAMILY=SPIGOT
|
||||
|
||||
exec "${SCRIPTS:-/}start-spiget" "$@"
|
||||
exec "$(dirname "$0")/start-spiget" "$@"
|
||||
|
||||
@@ -6,7 +6,7 @@ IFS=$'\n\t'
|
||||
: "${PURPUR_DOWNLOAD_URL:=}"
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "$(dirname "$0")/start-utils"
|
||||
isDebugging && set -x
|
||||
|
||||
resultsFile=/data/.purpur.env
|
||||
@@ -39,4 +39,4 @@ applyResultsFile ${resultsFile}
|
||||
# Normalize on Spigot for later operations
|
||||
export FAMILY=SPIGOT
|
||||
|
||||
exec "${SCRIPTS:-/}start-spiget" "$@"
|
||||
exec "$(dirname "$0")/start-spiget" "$@"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set -eu
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "$(dirname "$0")/start-utils"
|
||||
|
||||
: "${QUILT_LAUNCHER:=}"
|
||||
: "${QUILT_LAUNCHER_URL:=}"
|
||||
@@ -29,7 +29,7 @@ if [[ $QUILT_LAUNCHER ]]; then
|
||||
resolveVersion
|
||||
|
||||
export FAMILY=FABRIC
|
||||
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|
||||
exec "$(dirname "$0")/start-setupWorld" "$@"
|
||||
|
||||
elif [[ $QUILT_LAUNCHER_URL ]]; then
|
||||
logError "QUILT_LAUNCHER_URL is not longer supported. Pre-download and use QUILT_LAUNCHER."
|
||||
@@ -52,4 +52,4 @@ fi
|
||||
applyResultsFile ${resultsFile}
|
||||
|
||||
export FAMILY=FABRIC
|
||||
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|
||||
exec "$(dirname "$0")/start-setupWorld" "$@"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. ${SCRIPTS:-/}start-utils
|
||||
. "$(dirname "$0")/start-utils"
|
||||
|
||||
export TYPE=spongevanilla
|
||||
: ${SPONGEBRANCH:=STABLE}
|
||||
@@ -37,4 +37,4 @@ if [ ! -e "$SERVER" ] || [ -n "$FORCE_REDOWNLOAD" ]; then
|
||||
fi
|
||||
|
||||
export FAMILY=SPONGE
|
||||
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|
||||
exec "$(dirname "$0")/start-setupWorld" "$@"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "$(dirname "$0")/start-utils"
|
||||
isDebugging && set -x
|
||||
set -o pipefail
|
||||
|
||||
@@ -53,4 +53,4 @@ fi
|
||||
|
||||
isDebugging && ls -l
|
||||
export FAMILY=VANILLA
|
||||
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|
||||
exec "$(dirname "$0")/start-setupWorld" "$@"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
: "${CUSTOM_JAR_EXEC:=}"
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "$(dirname "$0")/start-utils"
|
||||
isDebugging && set -x
|
||||
baseDataDir=/data
|
||||
tmpServerIconPath=/tmp/icon.img
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "$(dirname "$0")/start-utils"
|
||||
|
||||
: "${RCON_CMDS_STARTUP:=}"
|
||||
: "${RCON_CMDS_ON_CONNECT:=}"
|
||||
|
||||
@@ -10,7 +10,7 @@ set -e -o pipefail
|
||||
: "${REMOVE_OLD_DATAPACKS_INCLUDE:=*.zip}"
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "$(dirname "$0")/start-utils"
|
||||
isDebugging && set -x
|
||||
|
||||
out_dir=/data/${LEVEL:-world}/datapacks
|
||||
@@ -89,4 +89,4 @@ if [[ ${VANILLATWEAKS_FILE} || ${VANILLATWEAKS_SHARECODE} ]]; then
|
||||
--pack-files="$VANILLATWEAKS_FILE"
|
||||
fi
|
||||
|
||||
exec "${SCRIPTS:-/}start-setupModpack" "$@"
|
||||
exec "$(dirname "$0")/start-setupModpack" "$@"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "$(dirname "$0")/start-utils"
|
||||
|
||||
set -e
|
||||
handleDebugMode
|
||||
@@ -61,4 +61,4 @@ if [[ ${PATCH_DEFINITIONS} ]]; then
|
||||
"${PATCH_DEFINITIONS}"
|
||||
fi
|
||||
|
||||
exec "${SCRIPTS:-/}start-setupRbac" "$@"
|
||||
exec "$(dirname "$0")/start-setupRbac" "$@"
|
||||
|
||||
@@ -26,7 +26,7 @@ if [[ -n ${CF_API_KEY_FILE} ]]; then
|
||||
fi
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "$(dirname "$0")/start-utils"
|
||||
isDebugging && set -x
|
||||
|
||||
# CURSE_URL_BASE used in manifest downloads below
|
||||
@@ -255,7 +255,6 @@ function handleGenericPacks() {
|
||||
}
|
||||
|
||||
function handleModrinthProjects() {
|
||||
: "${MODRINTH_PROJECTS:=}"
|
||||
: "${MODRINTH_ALLOWED_VERSION_TYPE:=release}"
|
||||
: "${MODRINTH_DOWNLOAD_DEPENDENCIES:=none}"
|
||||
if [[ -v MODRINTH_DOWNLOAD_OPTIONAL_DEPENDENCIES ]]; then
|
||||
@@ -263,7 +262,7 @@ function handleModrinthProjects() {
|
||||
logWarning " Use MODRINTH_DOWNLOAD_DEPENDENCIES=optional instead"
|
||||
fi
|
||||
|
||||
if [[ $MODRINTH_PROJECTS ]]; then
|
||||
if [[ -v MODRINTH_PROJECTS ]]; then
|
||||
|
||||
if isType CUSTOM; then
|
||||
if ! [[ $MODRINTH_LOADER ]]; then
|
||||
@@ -366,4 +365,4 @@ case "X$MODCONFIG" in
|
||||
esac
|
||||
fi
|
||||
|
||||
exec "${SCRIPTS:-/}start-setupMounts" "$@"
|
||||
exec "$(dirname "$0")/start-setupMounts" "$@"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "$(dirname "$0")/start-utils"
|
||||
|
||||
: "${SYNC_SKIP_NEWER_IN_DESTINATION:=${PLUGINS_SYNC_UPDATE:-true}}"
|
||||
: "${REPLACE_ENV_DURING_SYNC:=true}"
|
||||
@@ -58,4 +58,4 @@ fi
|
||||
log "Copying any configs from ${COPY_CONFIG_SRC} to ${COPY_CONFIG_DEST}"
|
||||
mc-image-helper-mounts "${COPY_CONFIG_SRC}" "${COPY_CONFIG_DEST}"
|
||||
|
||||
exec "${SCRIPTS:-/}start-setupServerProperties" "$@"
|
||||
exec "$(dirname "$0")/start-setupServerProperties" "$@"
|
||||
|
||||
@@ -6,7 +6,7 @@ IFS=$'\n\t'
|
||||
: "${EXISTING_WHITELIST_FILE:=SYNC_FILE_MERGE_LIST}"
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "$(dirname "$0")/start-utils"
|
||||
isDebugging && set -x
|
||||
|
||||
if [[ -v APPEND_OPS ]] && isTrue "${APPEND_OPS}"; then
|
||||
@@ -97,4 +97,4 @@ if [[ -v WHITELIST ]]; then
|
||||
$WHITELIST
|
||||
fi
|
||||
|
||||
exec "${SCRIPTS:-/}start-finalExec" "$@"
|
||||
exec "$(dirname "$0")/start-finalExec" "$@"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "$(dirname "$0")/start-utils"
|
||||
|
||||
: "${SERVER_PROPERTIES:=/data/server.properties}"
|
||||
: "${OVERRIDE_SERVER_PROPERTIES:=true}"
|
||||
@@ -179,4 +179,4 @@ if isTrue "${DUMP_SERVER_PROPERTIES:-false}"; then
|
||||
cat "${SERVER_PROPERTIES}"
|
||||
fi
|
||||
|
||||
exec "${SCRIPTS:-/}start-setupEnvVariables" "$@"
|
||||
exec "$(dirname "$0")/start-setupEnvVariables" "$@"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "$(dirname "$0")/start-utils"
|
||||
set -e
|
||||
isDebugging && set -x
|
||||
|
||||
@@ -135,4 +135,4 @@ fi
|
||||
[[ -f ${worldDownload} ]] && rm ${worldDownload}
|
||||
[[ -d ${tmpWorldData} ]] && rm -rf ${tmpWorldData}
|
||||
|
||||
exec "${SCRIPTS:-/}start-setupDatapack" "$@"
|
||||
exec "$(dirname "$0")/start-setupDatapack" "$@"
|
||||
|
||||
@@ -3,7 +3,7 @@ set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
. "$(dirname "$0")/start-utils"
|
||||
handleDebugMode
|
||||
|
||||
: "${SPIGET_RESOURCES:=}"
|
||||
@@ -142,4 +142,4 @@ if [[ ${SPIGET_RESOURCES} ]]; then
|
||||
done
|
||||
fi
|
||||
|
||||
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|
||||
exec "$(dirname "$0")/start-setupWorld" "$@"
|
||||
|
||||
2
tests/setuponlytests/nanolimbo/require.sh
Normal file
2
tests/setuponlytests/nanolimbo/require.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
# Disable for now...will be fixed in next PR
|
||||
exit 1
|
||||
Reference in New Issue
Block a user