Skip to content

Commit a77ed28

Browse files
authored
Format allowlist.json exactly like command does (#337)
Also * box64 package now needs to be qualified by platform * Default ALLOW_LIST to false when ALLOW_LIST_USERS not used
1 parent e421ad2 commit a77ed28

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ RUN if [ "$TARGETARCH" = "arm64" ] ; then \
1919
curl -L https://ryanfortner.github.io/box64-debs/box64.list -o /etc/apt/sources.list.d/box64.list && \
2020
curl -L https://ryanfortner.github.io/box64-debs/KEY.gpg | gpg --dearmor | tee /etc/apt/trusted.gpg.d/box64-debs-archive-keyring.gpg && \
2121
apt-get update && \
22-
DEBIAN_FRONTEND=noninteractive apt-get install -y box64 \
22+
DEBIAN_FRONTEND=noninteractive apt-get install -y box64-generic-arm \
2323
&& apt-get clean \
2424
&& rm -rf /var/lib/apt/lists/* ;\
2525
fi

bedrock-entry.sh

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -169,16 +169,18 @@ allowListUsers=${ALLOW_LIST_USERS:-${WHITE_LIST_USERS}}
169169

170170
if [ -n "$allowListUsers" ]; then
171171
echo "Setting allow list"
172-
for f in whitelist.json allowlist.json; do
173-
if [ -f $f ]; then
174-
rm -rf $f
175-
fi
176-
jq -n --arg users "$allowListUsers" '$users | split(",") | map({"name": .})' > $f
177-
done
172+
f=allowlist.json
173+
rm -rf "$f"
174+
jq -c -n --arg users "$allowListUsers" '$users | split(",") | map({"ignoresPlayerLimit":false,"name": .})' > "$f"
178175
# activate server property to enable list usage
179-
export WHITE_LIST=true
180-
export ALLOW_LIST=true
176+
WHITE_LIST=true
177+
ALLOW_LIST=true
178+
else
179+
rm -rf whitelist.json allowlist.json
180+
: "${WHITE_LIST:=false}"
181+
: "${ALLOW_LIST:=false}"
181182
fi
183+
export WHITE_LIST ALLOW_LIST
182184

183185
set-property --file server.properties --bulk /etc/bds-property-definitions.json
184186

0 commit comments

Comments
 (0)