mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-12-04 17:39:37 +00:00
Place EULA file into subdir managed by ServerSetup (#1543)
This commit is contained in:
parent
fd2431046c
commit
1fb04c069c
3 changed files with 89 additions and 92 deletions
17
.gitattributes
vendored
17
.gitattributes
vendored
|
@ -1,17 +1,2 @@
|
|||
# Auto detect text files and perform LF normalization
|
||||
* text=auto
|
||||
|
||||
# Custom for Visual Studio
|
||||
*.cs diff=csharp
|
||||
|
||||
# Standard to msysgit
|
||||
*.doc diff=astextplain
|
||||
*.DOC diff=astextplain
|
||||
*.docx diff=astextplain
|
||||
*.DOCX diff=astextplain
|
||||
*.dot diff=astextplain
|
||||
*.DOT diff=astextplain
|
||||
*.pdf diff=astextplain
|
||||
*.PDF diff=astextplain
|
||||
*.rtf diff=astextplain
|
||||
*.RTF diff=astextplain
|
||||
* text=lf
|
||||
|
|
|
@ -46,7 +46,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
|||
--var version=0.1.1 --var app=maven-metadata-release --file {{.app}} \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
ARG MC_HELPER_VERSION=1.16.11
|
||||
ARG MC_HELPER_VERSION=1.17.0
|
||||
ARG MC_HELPER_BASE_URL=https://github.com/itzg/mc-image-helper/releases/download/v${MC_HELPER_VERSION}
|
||||
RUN curl -fsSL ${MC_HELPER_BASE_URL}/mc-image-helper-${MC_HELPER_VERSION}.tgz \
|
||||
| tar -C /usr/share -zxf - \
|
||||
|
|
|
@ -210,6 +210,18 @@ EOF
|
|||
fi
|
||||
fi
|
||||
|
||||
# Modpacks that use https://github.com/BloodyMods/ServerStarter will sometimes specify an
|
||||
# extra subpath where all the server files get installed. Need to transplant EULA file there.
|
||||
serverSetupConfig=$(find "${FTB_BASE_DIR}" -type f -name server-setup-config.yaml)
|
||||
if [[ $serverSetupConfig && $serverSetupConfig != "~" ]]; then
|
||||
if baseInstallPath=$(mc-image-helper yaml-path --file "$serverSetupConfig" ".install.baseInstallPath"); then
|
||||
resolvedBaseInstallPath="$(dirname "$serverSetupConfig")/${baseInstallPath}"
|
||||
mkdir -p "$resolvedBaseInstallPath"
|
||||
|
||||
cp -n /data/eula.txt "${resolvedBaseInstallPath}/eula.txt"
|
||||
fi
|
||||
fi
|
||||
|
||||
FTB_SERVER_START="$startScript"
|
||||
export FTB_SERVER_START
|
||||
|
||||
|
|
Loading…
Reference in a new issue