Skip to content

Commit cafafa6

Browse files
committed
Upgraded restify to 1.3.0 to include user-agent header
#155
1 parent b6902c2 commit cafafa6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ RUN easy-add --var version=0.2.1 --var app=entrypoint-demoter --file {{.app}} --
2929

3030
RUN easy-add --var version=0.1.1 --var app=set-property --file {{.app}} --from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_linux_${ARCH}.tar.gz
3131

32-
RUN easy-add --var version=1.2.0 --var app=restify --file {{.app}} --from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_linux_${ARCH}.tar.gz
32+
RUN easy-add --var version=1.3.0 --var app=restify --file {{.app}} --from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_linux_${ARCH}.tar.gz
3333

3434
RUN easy-add --var version=0.5.0 --var app=mc-monitor --file {{.app}} --from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_linux_${ARCH}.tar.gz
3535

bedrock-entry.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ if [[ ${DEBUG^^} = TRUE ]]; then
88
echo "DEBUG: running as $(id -a) with $(ls -ld /data)"
99
fi
1010

11-
downloadPage=https://www.minecraft.net/en-us/download/server/bedrock/
11+
downloadPage=https://www.minecraft.net/en-us/download/server/bedrock
1212

1313
if [[ ${EULA^^} != TRUE ]]; then
1414
echo
@@ -40,9 +40,9 @@ case ${VERSION^^} in
4040
VERSION=1.16.20.03
4141
;;
4242
LATEST)
43-
for a in data-bi-prtid data-platform; do
43+
for a in data-platform data-bi-prtid; do
4444
for i in {1..3}; do
45-
DOWNLOAD_URL=$(restify --attribute=${a}=serverBedrockLinux ${downloadPage} 2> restify.err | jq -r '.[0].href' || echo '')
45+
DOWNLOAD_URL=$(restify --user-agent=itzg/minecraft-bedrock-server --attribute=${a}=serverBedrockLinux ${downloadPage} 2> restify.err | jq -r '.[0].href' || echo '')
4646
if [[ ${DOWNLOAD_URL} ]]; then
4747
break 2
4848
fi

0 commit comments

Comments
 (0)