diff --git a/bedrock-entry.sh b/bedrock-entry.sh index 69ce7d0..65f52b4 100755 --- a/bedrock-entry.sh +++ b/bedrock-entry.sh @@ -117,7 +117,7 @@ fi if [ -n "$WHITE_LIST_USERS" ]; then echo "Setting whitelist" rm -rf whitelist.json - echo $WHITE_LIST_USERS | awk -v RS=, 'BEGIN{print "["}; {print "{ \"name\": \"" $1 "\" },"}; END{print "]"}' > whitelist.json + echo "$WHITE_LIST_USERS" | jq -R 'split(",") | map({"name": .})' > whitelist.json # flag whitelist to true so the server properties process correctly export WHITE_LIST=true fi