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
This commit is contained in:
1 parent
e421ad2ca6
commit
a77ed28d69
2 files changed
+11
-9
No files matched your search
+1
-1
@@ -19,7 +19,7 @@ RUN if [ "$TARGETARCH" = "arm64" ] ; then \
|
|||||||
curl -L https://ryanfortner.github.io/box64-debs/box64.list -o /etc/apt/sources.list.d/box64.list && \
|
curl -L https://ryanfortner.github.io/box64-debs/box64.list -o /etc/apt/sources.list.d/box64.list && \
|
||||||
curl -L https://ryanfortner.github.io/box64-debs/KEY.gpg | gpg --dearmor | tee /etc/apt/trusted.gpg.d/box64-debs-archive-keyring.gpg && \
|
curl -L https://ryanfortner.github.io/box64-debs/KEY.gpg | gpg --dearmor | tee /etc/apt/trusted.gpg.d/box64-debs-archive-keyring.gpg && \
|
||||||
apt-get update && \
|
apt-get update && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install -y box64 \
|
DEBIAN_FRONTEND=noninteractive apt-get install -y box64-generic-arm \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf /var/lib/apt/lists/* ;\
|
&& rm -rf /var/lib/apt/lists/* ;\
|
||||||
fi
|
fi
|
||||||
|
|||||||
+10
-8
@@ -169,16 +169,18 @@ allowListUsers=${ALLOW_LIST_USERS:-${WHITE_LIST_USERS}}
|
|||||||
|
|
||||||
if [ -n "$allowListUsers" ]; then
|
if [ -n "$allowListUsers" ]; then
|
||||||
echo "Setting allow list"
|
echo "Setting allow list"
|
||||||
for f in whitelist.json allowlist.json; do
|
f=allowlist.json
|
||||||
if [ -f $f ]; then
|
rm -rf "$f"
|
||||||
rm -rf $f
|
jq -c -n --arg users "$allowListUsers" '$users | split(",") | map({"ignoresPlayerLimit":false,"name": .})' > "$f"
|
||||||
fi
|
|
||||||
jq -n --arg users "$allowListUsers" '$users | split(",") | map({"name": .})' > $f
|
|
||||||
done
|
|
||||||
# activate server property to enable list usage
|
# activate server property to enable list usage
|
||||||
export WHITE_LIST=true
|
WHITE_LIST=true
|
||||||
export ALLOW_LIST=true
|
ALLOW_LIST=true
|
||||||
|
else
|
||||||
|
rm -rf whitelist.json allowlist.json
|
||||||
|
: "${WHITE_LIST:=false}"
|
||||||
|
: "${ALLOW_LIST:=false}"
|
||||||
fi
|
fi
|
||||||
|
export WHITE_LIST ALLOW_LIST
|
||||||
|
|
||||||
set-property --file server.properties --bulk /etc/bds-property-definitions.json
|
set-property --file server.properties --bulk /etc/bds-property-definitions.json
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user