Ensure whitelist.json not present when using allow list (#341)

This commit is contained in:
Geoff Bourne authored and GitHub committed 2023-07-15 09:10:47 -05:00
1 parent 8756c97fab
commit b626ba5a9a
1 file changed
+2 -4
+2 -4
View File
@@ -171,12 +171,10 @@ if [[ -v ALLOW_LIST_USERS || -v WHITE_LIST_USERS ]]; then
if [[ $allowListUsers ]]; then
echo "Setting allow list"
f=allowlist.json
rm -rf "$f"
jq -c -n --arg users "$allowListUsers" '$users | split(",") | map({"ignoresPlayerLimit":false,"name": .})' > "$f"
jq -c -n --arg users "$allowListUsers" '$users | split(",") | map({"ignoresPlayerLimit":false,"name": .})' > "allowlist.json"
# activate server property to enable list usage
WHITE_LIST=true
ALLOW_LIST=true
rm -f whitelist.json
else
rm -rf whitelist.json allowlist.json
WHITE_LIST=false